Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

View File

@@ -0,0 +1 @@
{"files":{"Cargo.modified.toml":"48e39647f08313fb2a9f85b98d015a8997d071c1ee644b6f58472addebfbd419","Cargo.toml":"1c09139b63daef0bad18254082fb6df7d36e1293ac9235b404903ecd74c5c5dd","README.md":"3b48e49924a8569c49f8f268f15976717aa6dfbb61f185322377d2047aeb05fb","src/generated/CAAnimation.rs":"620c811de8b9db8b65681623633c217c5176ea8233bbcd33e740a31b955c460d","src/generated/CABase.rs":"e14859bd54576a06f37478e36b868d08d410dc13c65bac2389f79db165b45efd","src/generated/CAConstraintLayoutManager.rs":"9cbdfdeb379dc2744cf2614dbf938094b1ab497669898c2bec72a9afcb2ec0c6","src/generated/CADisplayLink.rs":"d02820a9aeb6e9977d54db73054cd9a90d54c5b334e7a7950ae0e23b1b7fae40","src/generated/CAEDRMetadata.rs":"f239bebcb9c0fea30bf81d1b52ec322764595d51e522f8bda6f33fe2e77de0f2","src/generated/CAEmitterCell.rs":"d51101df5758409bff888c330292cd1b3c54906f36f6b97ef0937cbb9c930a16","src/generated/CAEmitterLayer.rs":"2c184700c4b5b43978e6738a49a5e4cf65291bf940ebd64ac9fb2ca929da9b04","src/generated/CAFrameRateRange.rs":"dee197d991d85f0827487e8425301c24f3d265f1a992d43a7057604191653f23","src/generated/CAGradientLayer.rs":"30dc114349e047d38c37f4d55f237c0dca256c6a20931551186d079cf4aea5df","src/generated/CALayer.rs":"f8ceb01a936debbad1f724cea85ad9b3b24fde220af8409abc549c6f6b727512","src/generated/CAMediaTiming.rs":"7e85d1095254cd6a912c096a16f97eae200e308f981e7f53e4e63cc6343edf82","src/generated/CAMediaTimingFunction.rs":"d45e981dfb27895d276f52cf2b603d3edf53a69a28e8dd1ea60c36f79e8c1c79","src/generated/CAMetalDisplayLink.rs":"646be14e91f4ab163c1ea63c0abf6965d6a15ea71fb8afce8f1c3f12f79501ac","src/generated/CAMetalLayer.rs":"39fa817c4d1f6dad7b036a1675d704d5a2c5c3c36a48644a6f1330a67c86ef9f","src/generated/CAOpenGLLayer.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/CARemoteLayerClient.rs":"654d7eb233752cf9f3527804293e9b6b923d91e47fa729eae50c10536ab2a974","src/generated/CARemoteLayerServer.rs":"f9a874080675d0f7ae5b1b790f57abb67e1a216fe9bbc8f3d6207da00c4a4103","src/generated/CARenderer.rs":"f731282da07573ff07e127d6cc8924381ad8d4c5d57bbce94ba5c622330f4b4e","src/generated/CAReplicatorLayer.rs":"95a40ff62d023a815d10a798a58579c08774bcb9508f1a448fb0af950af089c5","src/generated/CAScrollLayer.rs":"6e5cc54e4b337aa1b571795f5525b4726836031c9193e6ff336fd90970ff440a","src/generated/CAShapeLayer.rs":"817299dff8628095a3206668840b37c1bb6070ba4d29f8e58521d36e097055b5","src/generated/CATextLayer.rs":"cce5799fc4c9f8b9a2f54f0f7c62695b74fc892ccbef9f1565e277e71925bbad","src/generated/CATiledLayer.rs":"bf0a49f98028ab66a930e2e812221d854004e55376d8c864e74a6e65b278a175","src/generated/CATransaction.rs":"754f42ebee033e66164ad2a285cb1706bf29cc5bf50b244af087c104c15df229","src/generated/CATransform3D.rs":"3393d6a31772baa5449d38a6136ae11c41ba6997b01b2150a3402074d2ee66dd","src/generated/CATransformLayer.rs":"2ad23a5133be498051a247d241765feaf2a5bc89ffcb0728965cbf67f7cf9576","src/generated/CAValueFunction.rs":"638b27173bc8b5a590fcc11633d2c545643ecd7e5c635f8ecf797bfd5474c595","src/generated/CoreAnimation.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/CoreImage.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/CoreVideo.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/mod.rs":"9e82df38402695d23d50096f36a1f6f8baa2936b190c98ddd17e980402e42625","src/lib.rs":"80b36338edf6869a27afbb124034dcb75d3abe68f5403b84457a5e2e52a77cf3","translation-config.toml":"d18dda28a63a8222295bae1fadec30745526d434c8018ded88c76ab94493d537"},"package":"e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"}

View File

@@ -0,0 +1,11 @@
[package]
description = "Bindings to the QuartzCore/CoreAnimation framework"
[features]
# No-op, deprecated
apple = []
gnustep-1-7 = []
gnustep-1-8 = []
gnustep-1-9 = []
gnustep-2-0 = []
gnustep-2-1 = []

277
vendor/objc2-quartz-core/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,277 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.60"
name = "objc2-quartz-core"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the QuartzCore/CoreAnimation framework"
readme = "README.md"
keywords = [
"cocoa",
"apple",
"framework",
"macos",
"ios",
]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
license = "MIT"
repository = "https://github.com/madsmtm/objc2"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_quartz_core"
path = "src/lib.rs"
[dependencies.bitflags]
version = "2.5.0"
optional = true
default-features = false
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[dependencies.objc2-metal]
version = "0.2.2"
optional = true
default-features = false
[features]
CAAnimation = [
"objc2-foundation/NSArray",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
CABase = []
CAConstraintLayoutManager = [
"objc2-foundation/NSArray",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CADisplayLink = [
"objc2-foundation/NSObjCRuntime",
"objc2-foundation/NSRunLoop",
"objc2-foundation/NSString",
]
CAEDRMetadata = [
"objc2-foundation/NSData",
"objc2-foundation/NSObject",
]
CAEmitterCell = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CAEmitterLayer = [
"objc2-foundation/NSArray",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CAFrameRateRange = []
CAGradientLayer = [
"objc2-foundation/NSArray",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
CALayer = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSNull",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CAMediaTiming = ["objc2-foundation/NSString"]
CAMediaTimingFunction = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CAMetalDisplayLink = [
"objc2-foundation/NSObjCRuntime",
"objc2-foundation/NSRunLoop",
"objc2-foundation/NSString",
"objc2-metal?/MTLDrawable",
]
CAMetalLayer = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-metal?/MTLDevice",
"objc2-metal?/MTLDrawable",
"objc2-metal?/MTLPixelFormat",
"objc2-metal?/MTLResource",
"objc2-metal?/MTLTexture",
]
CAOpenGLLayer = []
CARemoteLayerClient = []
CARemoteLayerServer = []
CARenderer = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSString",
]
CAReplicatorLayer = [
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
]
CAScrollLayer = [
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CAShapeLayer = [
"objc2-foundation/NSArray",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
CATextLayer = [
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CATiledLayer = [
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
]
CATransaction = ["objc2-foundation/NSString"]
CATransform3D = [
"objc2-foundation/NSGeometry",
"objc2-foundation/NSValue",
]
CATransformLayer = ["objc2-foundation/NSObject"]
CAValueFunction = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CoreAnimation = []
CoreImage = []
CoreVideo = []
all = [
"CAAnimation",
"CABase",
"CAConstraintLayoutManager",
"CADisplayLink",
"CAEDRMetadata",
"CAEmitterCell",
"CAEmitterLayer",
"CAFrameRateRange",
"CAGradientLayer",
"CALayer",
"CAMediaTiming",
"CAMediaTimingFunction",
"CAMetalDisplayLink",
"CAMetalLayer",
"CAOpenGLLayer",
"CARemoteLayerClient",
"CARemoteLayerServer",
"CARenderer",
"CAReplicatorLayer",
"CAScrollLayer",
"CAShapeLayer",
"CATextLayer",
"CATiledLayer",
"CATransaction",
"CATransform3D",
"CATransformLayer",
"CAValueFunction",
"CoreAnimation",
"CoreImage",
"CoreVideo",
"bitflags",
"block2",
"objc2-metal",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-foundation/alloc",
"objc2-metal?/alloc",
]
apple = []
bitflags = [
"dep:bitflags",
"objc2-foundation/bitflags",
"objc2-metal?/bitflags",
]
block2 = [
"dep:block2",
"objc2-foundation/block2",
"objc2-metal?/block2",
]
default = ["std"]
gnustep-1-7 = []
gnustep-1-8 = []
gnustep-1-9 = []
gnustep-2-0 = []
gnustep-2-1 = []
objc2-metal = ["dep:objc2-metal"]
std = [
"alloc",
"bitflags?/std",
"block2?/std",
"objc2/std",
"objc2-foundation/std",
"objc2-metal?/std",
]
[lints.clippy]
cargo = "warn"
ptr_as_ptr = "warn"
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "deny"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

14
vendor/objc2-quartz-core/README.md vendored Normal file
View File

@@ -0,0 +1,14 @@
# `objc2-quartz-core`
[![Latest version](https://badgen.net/crates/v/objc2-quartz-core)](https://crates.io/crates/objc2-quartz-core)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc2-quartz-core/badge.svg)](https://docs.rs/objc2-quartz-core/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)
Rust bindings to Apple's framework QuartzCore.
This README is kept intentionally small to consolidate the documentation, see
[the Rust docs](https://docs.rs/objc2-quartz-core/) for more details on this crate.
This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2),
see that for related crates.

View File

@@ -0,0 +1,668 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAAnimationCalculationMode = NSString;
// NS_TYPED_ENUM
pub type CAAnimationRotationMode = NSString;
// NS_TYPED_ENUM
pub type CATransitionType = NSString;
// NS_TYPED_ENUM
pub type CATransitionSubtype = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAAnimation;
unsafe impl ClassType for CAAnimation {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CAAnimation {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CAAnimation {}
unsafe impl NSCoding for CAAnimation {}
unsafe impl NSCopying for CAAnimation {}
unsafe impl NSObjectProtocol for CAAnimation {}
unsafe impl NSSecureCoding for CAAnimation {}
extern_methods!(
unsafe impl CAAnimation {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
#[method_id(@__retain_semantics Other defaultValueForKey:)]
pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
#[method(shouldArchiveValueForKey:)]
pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;
#[cfg(feature = "CAMediaTimingFunction")]
#[method_id(@__retain_semantics Other timingFunction)]
pub unsafe fn timingFunction(&self) -> Option<Retained<CAMediaTimingFunction>>;
#[cfg(feature = "CAMediaTimingFunction")]
#[method(setTimingFunction:)]
pub unsafe fn setTimingFunction(&self, timing_function: Option<&CAMediaTimingFunction>);
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn CAAnimationDelegate>>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CAAnimationDelegate>>,
);
#[method(isRemovedOnCompletion)]
pub unsafe fn isRemovedOnCompletion(&self) -> bool;
#[method(setRemovedOnCompletion:)]
pub unsafe fn setRemovedOnCompletion(&self, removed_on_completion: bool);
#[cfg(feature = "CAFrameRateRange")]
#[method(preferredFrameRateRange)]
pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;
#[cfg(feature = "CAFrameRateRange")]
#[method(setPreferredFrameRateRange:)]
pub unsafe fn setPreferredFrameRateRange(
&self,
preferred_frame_rate_range: CAFrameRateRange,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAAnimation {
#[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_protocol!(
pub unsafe trait CAAnimationDelegate: NSObjectProtocol {
#[optional]
#[method(animationDidStart:)]
unsafe fn animationDidStart(&self, anim: &CAAnimation);
#[optional]
#[method(animationDidStop:finished:)]
unsafe fn animationDidStop_finished(&self, anim: &CAAnimation, flag: bool);
}
unsafe impl ProtocolType for dyn CAAnimationDelegate {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAPropertyAnimation;
unsafe impl ClassType for CAPropertyAnimation {
#[inherits(NSObject)]
type Super = CAAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CAPropertyAnimation {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CAPropertyAnimation {}
unsafe impl NSCoding for CAPropertyAnimation {}
unsafe impl NSCopying for CAPropertyAnimation {}
unsafe impl NSObjectProtocol for CAPropertyAnimation {}
unsafe impl NSSecureCoding for CAPropertyAnimation {}
extern_methods!(
unsafe impl CAPropertyAnimation {
#[method_id(@__retain_semantics Other animationWithKeyPath:)]
pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
#[method_id(@__retain_semantics Other keyPath)]
pub unsafe fn keyPath(&self) -> Option<Retained<NSString>>;
#[method(setKeyPath:)]
pub unsafe fn setKeyPath(&self, key_path: Option<&NSString>);
#[method(isAdditive)]
pub unsafe fn isAdditive(&self) -> bool;
#[method(setAdditive:)]
pub unsafe fn setAdditive(&self, additive: bool);
#[method(isCumulative)]
pub unsafe fn isCumulative(&self) -> bool;
#[method(setCumulative:)]
pub unsafe fn setCumulative(&self, cumulative: bool);
#[cfg(feature = "CAValueFunction")]
#[method_id(@__retain_semantics Other valueFunction)]
pub unsafe fn valueFunction(&self) -> Option<Retained<CAValueFunction>>;
#[cfg(feature = "CAValueFunction")]
#[method(setValueFunction:)]
pub unsafe fn setValueFunction(&self, value_function: Option<&CAValueFunction>);
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CAPropertyAnimation {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAPropertyAnimation {
#[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 CABasicAnimation;
unsafe impl ClassType for CABasicAnimation {
#[inherits(CAAnimation, NSObject)]
type Super = CAPropertyAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CABasicAnimation {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CABasicAnimation {}
unsafe impl NSCoding for CABasicAnimation {}
unsafe impl NSCopying for CABasicAnimation {}
unsafe impl NSObjectProtocol for CABasicAnimation {}
unsafe impl NSSecureCoding for CABasicAnimation {}
extern_methods!(
unsafe impl CABasicAnimation {
#[method_id(@__retain_semantics Other fromValue)]
pub unsafe fn fromValue(&self) -> Option<Retained<AnyObject>>;
#[method(setFromValue:)]
pub unsafe fn setFromValue(&self, from_value: Option<&AnyObject>);
#[method_id(@__retain_semantics Other toValue)]
pub unsafe fn toValue(&self) -> Option<Retained<AnyObject>>;
#[method(setToValue:)]
pub unsafe fn setToValue(&self, to_value: Option<&AnyObject>);
#[method_id(@__retain_semantics Other byValue)]
pub unsafe fn byValue(&self) -> Option<Retained<AnyObject>>;
#[method(setByValue:)]
pub unsafe fn setByValue(&self, by_value: Option<&AnyObject>);
}
);
extern_methods!(
/// Methods declared on superclass `CAPropertyAnimation`
unsafe impl CABasicAnimation {
#[method_id(@__retain_semantics Other animationWithKeyPath:)]
pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CABasicAnimation {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CABasicAnimation {
#[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 CAKeyframeAnimation;
unsafe impl ClassType for CAKeyframeAnimation {
#[inherits(CAAnimation, NSObject)]
type Super = CAPropertyAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CAKeyframeAnimation {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CAKeyframeAnimation {}
unsafe impl NSCoding for CAKeyframeAnimation {}
unsafe impl NSCopying for CAKeyframeAnimation {}
unsafe impl NSObjectProtocol for CAKeyframeAnimation {}
unsafe impl NSSecureCoding for CAKeyframeAnimation {}
extern_methods!(
unsafe impl CAKeyframeAnimation {
#[method_id(@__retain_semantics Other values)]
pub unsafe fn values(&self) -> Option<Retained<NSArray>>;
#[method(setValues:)]
pub unsafe fn setValues(&self, values: Option<&NSArray>);
#[method_id(@__retain_semantics Other keyTimes)]
pub unsafe fn keyTimes(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setKeyTimes:)]
pub unsafe fn setKeyTimes(&self, key_times: Option<&NSArray<NSNumber>>);
#[cfg(feature = "CAMediaTimingFunction")]
#[method_id(@__retain_semantics Other timingFunctions)]
pub unsafe fn timingFunctions(&self) -> Option<Retained<NSArray<CAMediaTimingFunction>>>;
#[cfg(feature = "CAMediaTimingFunction")]
#[method(setTimingFunctions:)]
pub unsafe fn setTimingFunctions(
&self,
timing_functions: Option<&NSArray<CAMediaTimingFunction>>,
);
#[method_id(@__retain_semantics Other calculationMode)]
pub unsafe fn calculationMode(&self) -> Retained<CAAnimationCalculationMode>;
#[method(setCalculationMode:)]
pub unsafe fn setCalculationMode(&self, calculation_mode: &CAAnimationCalculationMode);
#[method_id(@__retain_semantics Other tensionValues)]
pub unsafe fn tensionValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setTensionValues:)]
pub unsafe fn setTensionValues(&self, tension_values: Option<&NSArray<NSNumber>>);
#[method_id(@__retain_semantics Other continuityValues)]
pub unsafe fn continuityValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setContinuityValues:)]
pub unsafe fn setContinuityValues(&self, continuity_values: Option<&NSArray<NSNumber>>);
#[method_id(@__retain_semantics Other biasValues)]
pub unsafe fn biasValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setBiasValues:)]
pub unsafe fn setBiasValues(&self, bias_values: Option<&NSArray<NSNumber>>);
#[method_id(@__retain_semantics Other rotationMode)]
pub unsafe fn rotationMode(&self) -> Option<Retained<CAAnimationRotationMode>>;
#[method(setRotationMode:)]
pub unsafe fn setRotationMode(&self, rotation_mode: Option<&CAAnimationRotationMode>);
}
);
extern_methods!(
/// Methods declared on superclass `CAPropertyAnimation`
unsafe impl CAKeyframeAnimation {
#[method_id(@__retain_semantics Other animationWithKeyPath:)]
pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CAKeyframeAnimation {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAKeyframeAnimation {
#[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 "C" {
pub static kCAAnimationLinear: &'static CAAnimationCalculationMode;
}
extern "C" {
pub static kCAAnimationDiscrete: &'static CAAnimationCalculationMode;
}
extern "C" {
pub static kCAAnimationPaced: &'static CAAnimationCalculationMode;
}
extern "C" {
pub static kCAAnimationCubic: &'static CAAnimationCalculationMode;
}
extern "C" {
pub static kCAAnimationCubicPaced: &'static CAAnimationCalculationMode;
}
extern "C" {
pub static kCAAnimationRotateAuto: &'static CAAnimationRotationMode;
}
extern "C" {
pub static kCAAnimationRotateAutoReverse: &'static CAAnimationRotationMode;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CASpringAnimation;
unsafe impl ClassType for CASpringAnimation {
#[inherits(CAPropertyAnimation, CAAnimation, NSObject)]
type Super = CABasicAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CASpringAnimation {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CASpringAnimation {}
unsafe impl NSCoding for CASpringAnimation {}
unsafe impl NSCopying for CASpringAnimation {}
unsafe impl NSObjectProtocol for CASpringAnimation {}
unsafe impl NSSecureCoding for CASpringAnimation {}
extern_methods!(
unsafe impl CASpringAnimation {
#[method(mass)]
pub unsafe fn mass(&self) -> CGFloat;
#[method(setMass:)]
pub unsafe fn setMass(&self, mass: CGFloat);
#[method(stiffness)]
pub unsafe fn stiffness(&self) -> CGFloat;
#[method(setStiffness:)]
pub unsafe fn setStiffness(&self, stiffness: CGFloat);
#[method(damping)]
pub unsafe fn damping(&self) -> CGFloat;
#[method(setDamping:)]
pub unsafe fn setDamping(&self, damping: CGFloat);
#[method(initialVelocity)]
pub unsafe fn initialVelocity(&self) -> CGFloat;
#[method(setInitialVelocity:)]
pub unsafe fn setInitialVelocity(&self, initial_velocity: CGFloat);
#[method(allowsOverdamping)]
pub unsafe fn allowsOverdamping(&self) -> bool;
#[method(setAllowsOverdamping:)]
pub unsafe fn setAllowsOverdamping(&self, allows_overdamping: bool);
#[method(settlingDuration)]
pub unsafe fn settlingDuration(&self) -> CFTimeInterval;
#[method_id(@__retain_semantics Init initWithPerceptualDuration:bounce:)]
pub unsafe fn initWithPerceptualDuration_bounce(
this: Allocated<Self>,
perceptual_duration: CFTimeInterval,
bounce: CGFloat,
) -> Retained<Self>;
#[method(perceptualDuration)]
pub unsafe fn perceptualDuration(&self) -> CFTimeInterval;
#[method(bounce)]
pub unsafe fn bounce(&self) -> CGFloat;
}
);
extern_methods!(
/// Methods declared on superclass `CAPropertyAnimation`
unsafe impl CASpringAnimation {
#[method_id(@__retain_semantics Other animationWithKeyPath:)]
pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CASpringAnimation {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CASpringAnimation {
#[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 CATransition;
unsafe impl ClassType for CATransition {
#[inherits(NSObject)]
type Super = CAAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CATransition {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CATransition {}
unsafe impl NSCoding for CATransition {}
unsafe impl NSCopying for CATransition {}
unsafe impl NSObjectProtocol for CATransition {}
unsafe impl NSSecureCoding for CATransition {}
extern_methods!(
unsafe impl CATransition {
#[method_id(@__retain_semantics Other type)]
pub unsafe fn r#type(&self) -> Retained<CATransitionType>;
#[method(setType:)]
pub unsafe fn setType(&self, r#type: &CATransitionType);
#[method_id(@__retain_semantics Other subtype)]
pub unsafe fn subtype(&self) -> Option<Retained<CATransitionSubtype>>;
#[method(setSubtype:)]
pub unsafe fn setSubtype(&self, subtype: Option<&CATransitionSubtype>);
#[method(startProgress)]
pub unsafe fn startProgress(&self) -> c_float;
#[method(setStartProgress:)]
pub unsafe fn setStartProgress(&self, start_progress: c_float);
#[method(endProgress)]
pub unsafe fn endProgress(&self) -> c_float;
#[method(setEndProgress:)]
pub unsafe fn setEndProgress(&self, end_progress: c_float);
#[method_id(@__retain_semantics Other filter)]
pub unsafe fn filter(&self) -> Option<Retained<AnyObject>>;
#[method(setFilter:)]
pub unsafe fn setFilter(&self, filter: Option<&AnyObject>);
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CATransition {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CATransition {
#[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 "C" {
pub static kCATransitionFade: &'static CATransitionType;
}
extern "C" {
pub static kCATransitionMoveIn: &'static CATransitionType;
}
extern "C" {
pub static kCATransitionPush: &'static CATransitionType;
}
extern "C" {
pub static kCATransitionReveal: &'static CATransitionType;
}
extern "C" {
pub static kCATransitionFromRight: &'static CATransitionSubtype;
}
extern "C" {
pub static kCATransitionFromLeft: &'static CATransitionSubtype;
}
extern "C" {
pub static kCATransitionFromTop: &'static CATransitionSubtype;
}
extern "C" {
pub static kCATransitionFromBottom: &'static CATransitionSubtype;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAAnimationGroup;
unsafe impl ClassType for CAAnimationGroup {
#[inherits(NSObject)]
type Super = CAAnimation;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CAAction for CAAnimationGroup {}
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CAAnimationGroup {}
unsafe impl NSCoding for CAAnimationGroup {}
unsafe impl NSCopying for CAAnimationGroup {}
unsafe impl NSObjectProtocol for CAAnimationGroup {}
unsafe impl NSSecureCoding for CAAnimationGroup {}
extern_methods!(
unsafe impl CAAnimationGroup {
#[method_id(@__retain_semantics Other animations)]
pub unsafe fn animations(&self) -> Option<Retained<NSArray<CAAnimation>>>;
#[method(setAnimations:)]
pub unsafe fn setAnimations(&self, animations: Option<&NSArray<CAAnimation>>);
}
);
extern_methods!(
/// Methods declared on superclass `CAAnimation`
unsafe impl CAAnimationGroup {
#[method_id(@__retain_semantics Other animation)]
pub unsafe fn animation() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAAnimationGroup {
#[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>;
}
);

View File

@@ -0,0 +1,13 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
#[inline]
pub extern "C" fn CACurrentMediaTime() -> CFTimeInterval {
extern "C" {
fn CACurrentMediaTime() -> CFTimeInterval;
}
unsafe { CACurrentMediaTime() }
}

View File

@@ -0,0 +1,157 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CAConstraintAttribute(pub c_int);
impl CAConstraintAttribute {
pub const kCAConstraintMinX: Self = Self(0);
pub const kCAConstraintMidX: Self = Self(1);
pub const kCAConstraintMaxX: Self = Self(2);
pub const kCAConstraintWidth: Self = Self(3);
pub const kCAConstraintMinY: Self = Self(4);
pub const kCAConstraintMidY: Self = Self(5);
pub const kCAConstraintMaxY: Self = Self(6);
pub const kCAConstraintHeight: Self = Self(7);
}
unsafe impl Encode for CAConstraintAttribute {
const ENCODING: Encoding = c_int::ENCODING;
}
unsafe impl RefEncode for CAConstraintAttribute {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_methods!(
/// CAConstraintLayoutManager
#[cfg(feature = "CALayer")]
unsafe impl CALayer {
#[method_id(@__retain_semantics Other constraints)]
pub unsafe fn constraints(&self) -> Option<Retained<NSArray<CAConstraint>>>;
#[method(setConstraints:)]
pub unsafe fn setConstraints(&self, constraints: Option<&NSArray<CAConstraint>>);
#[method(addConstraint:)]
pub unsafe fn addConstraint(&self, c: &CAConstraint);
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAConstraintLayoutManager;
unsafe impl ClassType for CAConstraintLayoutManager {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CALayer")]
unsafe impl CALayoutManager for CAConstraintLayoutManager {}
unsafe impl NSObjectProtocol for CAConstraintLayoutManager {}
extern_methods!(
unsafe impl CAConstraintLayoutManager {
#[method_id(@__retain_semantics Other layoutManager)]
pub unsafe fn layoutManager() -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAConstraintLayoutManager {
#[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 CAConstraint;
unsafe impl ClassType for CAConstraint {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CAConstraint {}
unsafe impl NSObjectProtocol for CAConstraint {}
unsafe impl NSSecureCoding for CAConstraint {}
extern_methods!(
unsafe impl CAConstraint {
#[method_id(@__retain_semantics Other constraintWithAttribute:relativeTo:attribute:scale:offset:)]
pub unsafe fn constraintWithAttribute_relativeTo_attribute_scale_offset(
attr: CAConstraintAttribute,
src_id: &NSString,
src_attr: CAConstraintAttribute,
m: CGFloat,
c: CGFloat,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other constraintWithAttribute:relativeTo:attribute:offset:)]
pub unsafe fn constraintWithAttribute_relativeTo_attribute_offset(
attr: CAConstraintAttribute,
src_id: &NSString,
src_attr: CAConstraintAttribute,
c: CGFloat,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other constraintWithAttribute:relativeTo:attribute:)]
pub unsafe fn constraintWithAttribute_relativeTo_attribute(
attr: CAConstraintAttribute,
src_id: &NSString,
src_attr: CAConstraintAttribute,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithAttribute:relativeTo:attribute:scale:offset:)]
pub unsafe fn initWithAttribute_relativeTo_attribute_scale_offset(
this: Allocated<Self>,
attr: CAConstraintAttribute,
src_id: &NSString,
src_attr: CAConstraintAttribute,
m: CGFloat,
c: CGFloat,
) -> Retained<Self>;
#[method(attribute)]
pub unsafe fn attribute(&self) -> CAConstraintAttribute;
#[method_id(@__retain_semantics Other sourceName)]
pub unsafe fn sourceName(&self) -> Retained<NSString>;
#[method(sourceAttribute)]
pub unsafe fn sourceAttribute(&self) -> CAConstraintAttribute;
#[method(scale)]
pub unsafe fn scale(&self) -> CGFloat;
#[method(offset)]
pub unsafe fn offset(&self) -> CGFloat;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAConstraint {
#[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>;
}
);

View File

@@ -0,0 +1,90 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CADisplayLink;
unsafe impl ClassType for CADisplayLink {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CADisplayLink {}
extern_methods!(
unsafe impl CADisplayLink {
#[method_id(@__retain_semantics Other displayLinkWithTarget:selector:)]
pub unsafe fn displayLinkWithTarget_selector(
target: &AnyObject,
sel: Sel,
) -> Retained<CADisplayLink>;
#[method(addToRunLoop:forMode:)]
pub unsafe fn addToRunLoop_forMode(&self, runloop: &NSRunLoop, mode: &NSRunLoopMode);
#[method(removeFromRunLoop:forMode:)]
pub unsafe fn removeFromRunLoop_forMode(&self, runloop: &NSRunLoop, mode: &NSRunLoopMode);
#[method(invalidate)]
pub unsafe fn invalidate(&self);
#[method(timestamp)]
pub unsafe fn timestamp(&self) -> CFTimeInterval;
#[method(duration)]
pub unsafe fn duration(&self) -> CFTimeInterval;
#[method(targetTimestamp)]
pub unsafe fn targetTimestamp(&self) -> CFTimeInterval;
#[method(isPaused)]
pub unsafe fn isPaused(&self) -> bool;
#[method(setPaused:)]
pub unsafe fn setPaused(&self, paused: bool);
#[deprecated = "preferredFramesPerSecond"]
#[method(frameInterval)]
pub unsafe fn frameInterval(&self) -> NSInteger;
#[deprecated = "preferredFramesPerSecond"]
#[method(setFrameInterval:)]
pub unsafe fn setFrameInterval(&self, frame_interval: NSInteger);
#[deprecated]
#[method(preferredFramesPerSecond)]
pub unsafe fn preferredFramesPerSecond(&self) -> NSInteger;
#[deprecated]
#[method(setPreferredFramesPerSecond:)]
pub unsafe fn setPreferredFramesPerSecond(&self, preferred_frames_per_second: NSInteger);
#[cfg(feature = "CAFrameRateRange")]
#[method(preferredFrameRateRange)]
pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;
#[cfg(feature = "CAFrameRateRange")]
#[method(setPreferredFrameRateRange:)]
pub unsafe fn setPreferredFrameRateRange(
&self,
preferred_frame_rate_range: CAFrameRateRange,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CADisplayLink {
#[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>;
}
);

View File

@@ -0,0 +1,64 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAEDRMetadata;
unsafe impl ClassType for CAEDRMetadata {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CAEDRMetadata {}
unsafe impl NSCopying for CAEDRMetadata {}
unsafe impl NSObjectProtocol for CAEDRMetadata {}
unsafe impl NSSecureCoding for CAEDRMetadata {}
extern_methods!(
unsafe impl CAEDRMetadata {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Other HDR10MetadataWithDisplayInfo:contentInfo:opticalOutputScale:)]
pub unsafe fn HDR10MetadataWithDisplayInfo_contentInfo_opticalOutputScale(
display_data: Option<&NSData>,
content_data: Option<&NSData>,
scale: c_float,
) -> Retained<CAEDRMetadata>;
#[method_id(@__retain_semantics Other HDR10MetadataWithMinLuminance:maxLuminance:opticalOutputScale:)]
pub unsafe fn HDR10MetadataWithMinLuminance_maxLuminance_opticalOutputScale(
min_nits: c_float,
max_nits: c_float,
scale: c_float,
) -> Retained<CAEDRMetadata>;
#[method_id(@__retain_semantics Other HLGMetadataWithAmbientViewingEnvironment:)]
pub unsafe fn HLGMetadataWithAmbientViewingEnvironment(
data: &NSData,
) -> Retained<CAEDRMetadata>;
#[method_id(@__retain_semantics Other HLGMetadata)]
pub unsafe fn HLGMetadata() -> Retained<CAEDRMetadata>;
#[method(isAvailable)]
pub unsafe fn isAvailable() -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAEDRMetadata {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,253 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAEmitterCell;
unsafe impl ClassType for CAEmitterCell {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CAEmitterCell {}
unsafe impl NSCoding for CAEmitterCell {}
unsafe impl NSObjectProtocol for CAEmitterCell {}
unsafe impl NSSecureCoding for CAEmitterCell {}
extern_methods!(
unsafe impl CAEmitterCell {
#[method_id(@__retain_semantics Other emitterCell)]
pub unsafe fn emitterCell() -> Retained<Self>;
#[method_id(@__retain_semantics Other defaultValueForKey:)]
pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
#[method(shouldArchiveValueForKey:)]
pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method(isEnabled)]
pub unsafe fn isEnabled(&self) -> bool;
#[method(setEnabled:)]
pub unsafe fn setEnabled(&self, enabled: bool);
#[method(birthRate)]
pub unsafe fn birthRate(&self) -> c_float;
#[method(setBirthRate:)]
pub unsafe fn setBirthRate(&self, birth_rate: c_float);
#[method(lifetime)]
pub unsafe fn lifetime(&self) -> c_float;
#[method(setLifetime:)]
pub unsafe fn setLifetime(&self, lifetime: c_float);
#[method(lifetimeRange)]
pub unsafe fn lifetimeRange(&self) -> c_float;
#[method(setLifetimeRange:)]
pub unsafe fn setLifetimeRange(&self, lifetime_range: c_float);
#[method(emissionLatitude)]
pub unsafe fn emissionLatitude(&self) -> CGFloat;
#[method(setEmissionLatitude:)]
pub unsafe fn setEmissionLatitude(&self, emission_latitude: CGFloat);
#[method(emissionLongitude)]
pub unsafe fn emissionLongitude(&self) -> CGFloat;
#[method(setEmissionLongitude:)]
pub unsafe fn setEmissionLongitude(&self, emission_longitude: CGFloat);
#[method(emissionRange)]
pub unsafe fn emissionRange(&self) -> CGFloat;
#[method(setEmissionRange:)]
pub unsafe fn setEmissionRange(&self, emission_range: CGFloat);
#[method(velocity)]
pub unsafe fn velocity(&self) -> CGFloat;
#[method(setVelocity:)]
pub unsafe fn setVelocity(&self, velocity: CGFloat);
#[method(velocityRange)]
pub unsafe fn velocityRange(&self) -> CGFloat;
#[method(setVelocityRange:)]
pub unsafe fn setVelocityRange(&self, velocity_range: CGFloat);
#[method(xAcceleration)]
pub unsafe fn xAcceleration(&self) -> CGFloat;
#[method(setXAcceleration:)]
pub unsafe fn setXAcceleration(&self, x_acceleration: CGFloat);
#[method(yAcceleration)]
pub unsafe fn yAcceleration(&self) -> CGFloat;
#[method(setYAcceleration:)]
pub unsafe fn setYAcceleration(&self, y_acceleration: CGFloat);
#[method(zAcceleration)]
pub unsafe fn zAcceleration(&self) -> CGFloat;
#[method(setZAcceleration:)]
pub unsafe fn setZAcceleration(&self, z_acceleration: CGFloat);
#[method(scale)]
pub unsafe fn scale(&self) -> CGFloat;
#[method(setScale:)]
pub unsafe fn setScale(&self, scale: CGFloat);
#[method(scaleRange)]
pub unsafe fn scaleRange(&self) -> CGFloat;
#[method(setScaleRange:)]
pub unsafe fn setScaleRange(&self, scale_range: CGFloat);
#[method(scaleSpeed)]
pub unsafe fn scaleSpeed(&self) -> CGFloat;
#[method(setScaleSpeed:)]
pub unsafe fn setScaleSpeed(&self, scale_speed: CGFloat);
#[method(spin)]
pub unsafe fn spin(&self) -> CGFloat;
#[method(setSpin:)]
pub unsafe fn setSpin(&self, spin: CGFloat);
#[method(spinRange)]
pub unsafe fn spinRange(&self) -> CGFloat;
#[method(setSpinRange:)]
pub unsafe fn setSpinRange(&self, spin_range: CGFloat);
#[method(redRange)]
pub unsafe fn redRange(&self) -> c_float;
#[method(setRedRange:)]
pub unsafe fn setRedRange(&self, red_range: c_float);
#[method(greenRange)]
pub unsafe fn greenRange(&self) -> c_float;
#[method(setGreenRange:)]
pub unsafe fn setGreenRange(&self, green_range: c_float);
#[method(blueRange)]
pub unsafe fn blueRange(&self) -> c_float;
#[method(setBlueRange:)]
pub unsafe fn setBlueRange(&self, blue_range: c_float);
#[method(alphaRange)]
pub unsafe fn alphaRange(&self) -> c_float;
#[method(setAlphaRange:)]
pub unsafe fn setAlphaRange(&self, alpha_range: c_float);
#[method(redSpeed)]
pub unsafe fn redSpeed(&self) -> c_float;
#[method(setRedSpeed:)]
pub unsafe fn setRedSpeed(&self, red_speed: c_float);
#[method(greenSpeed)]
pub unsafe fn greenSpeed(&self) -> c_float;
#[method(setGreenSpeed:)]
pub unsafe fn setGreenSpeed(&self, green_speed: c_float);
#[method(blueSpeed)]
pub unsafe fn blueSpeed(&self) -> c_float;
#[method(setBlueSpeed:)]
pub unsafe fn setBlueSpeed(&self, blue_speed: c_float);
#[method(alphaSpeed)]
pub unsafe fn alphaSpeed(&self) -> c_float;
#[method(setAlphaSpeed:)]
pub unsafe fn setAlphaSpeed(&self, alpha_speed: c_float);
#[method_id(@__retain_semantics Other contents)]
pub unsafe fn contents(&self) -> Option<Retained<AnyObject>>;
#[method(setContents:)]
pub unsafe fn setContents(&self, contents: Option<&AnyObject>);
#[method(contentsRect)]
pub unsafe fn contentsRect(&self) -> CGRect;
#[method(setContentsRect:)]
pub unsafe fn setContentsRect(&self, contents_rect: CGRect);
#[method(contentsScale)]
pub unsafe fn contentsScale(&self) -> CGFloat;
#[method(setContentsScale:)]
pub unsafe fn setContentsScale(&self, contents_scale: CGFloat);
#[method_id(@__retain_semantics Other minificationFilter)]
pub unsafe fn minificationFilter(&self) -> Retained<NSString>;
#[method(setMinificationFilter:)]
pub unsafe fn setMinificationFilter(&self, minification_filter: &NSString);
#[method_id(@__retain_semantics Other magnificationFilter)]
pub unsafe fn magnificationFilter(&self) -> Retained<NSString>;
#[method(setMagnificationFilter:)]
pub unsafe fn setMagnificationFilter(&self, magnification_filter: &NSString);
#[method(minificationFilterBias)]
pub unsafe fn minificationFilterBias(&self) -> c_float;
#[method(setMinificationFilterBias:)]
pub unsafe fn setMinificationFilterBias(&self, minification_filter_bias: c_float);
#[method_id(@__retain_semantics Other emitterCells)]
pub unsafe fn emitterCells(&self) -> Option<Retained<NSArray<CAEmitterCell>>>;
#[method(setEmitterCells:)]
pub unsafe fn setEmitterCells(&self, emitter_cells: Option<&NSArray<CAEmitterCell>>);
#[method_id(@__retain_semantics Other style)]
pub unsafe fn style(&self) -> Option<Retained<NSDictionary>>;
#[method(setStyle:)]
pub unsafe fn setStyle(&self, style: Option<&NSDictionary>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAEmitterCell {
#[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>;
}
);

View File

@@ -0,0 +1,221 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAEmitterLayerEmitterShape = NSString;
// NS_TYPED_ENUM
pub type CAEmitterLayerEmitterMode = NSString;
// NS_TYPED_ENUM
pub type CAEmitterLayerRenderMode = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAEmitterLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAEmitterLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAEmitterLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAEmitterLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAEmitterLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAEmitterLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAEmitterLayer {
#[cfg(feature = "CAEmitterCell")]
#[method_id(@__retain_semantics Other emitterCells)]
pub unsafe fn emitterCells(&self) -> Option<Retained<NSArray<CAEmitterCell>>>;
#[cfg(feature = "CAEmitterCell")]
#[method(setEmitterCells:)]
pub unsafe fn setEmitterCells(&self, emitter_cells: Option<&NSArray<CAEmitterCell>>);
#[method(birthRate)]
pub unsafe fn birthRate(&self) -> c_float;
#[method(setBirthRate:)]
pub unsafe fn setBirthRate(&self, birth_rate: c_float);
#[method(lifetime)]
pub unsafe fn lifetime(&self) -> c_float;
#[method(setLifetime:)]
pub unsafe fn setLifetime(&self, lifetime: c_float);
#[method(emitterPosition)]
pub unsafe fn emitterPosition(&self) -> CGPoint;
#[method(setEmitterPosition:)]
pub unsafe fn setEmitterPosition(&self, emitter_position: CGPoint);
#[method(emitterZPosition)]
pub unsafe fn emitterZPosition(&self) -> CGFloat;
#[method(setEmitterZPosition:)]
pub unsafe fn setEmitterZPosition(&self, emitter_z_position: CGFloat);
#[method(emitterSize)]
pub unsafe fn emitterSize(&self) -> CGSize;
#[method(setEmitterSize:)]
pub unsafe fn setEmitterSize(&self, emitter_size: CGSize);
#[method(emitterDepth)]
pub unsafe fn emitterDepth(&self) -> CGFloat;
#[method(setEmitterDepth:)]
pub unsafe fn setEmitterDepth(&self, emitter_depth: CGFloat);
#[method_id(@__retain_semantics Other emitterShape)]
pub unsafe fn emitterShape(&self) -> Retained<CAEmitterLayerEmitterShape>;
#[method(setEmitterShape:)]
pub unsafe fn setEmitterShape(&self, emitter_shape: &CAEmitterLayerEmitterShape);
#[method_id(@__retain_semantics Other emitterMode)]
pub unsafe fn emitterMode(&self) -> Retained<CAEmitterLayerEmitterMode>;
#[method(setEmitterMode:)]
pub unsafe fn setEmitterMode(&self, emitter_mode: &CAEmitterLayerEmitterMode);
#[method_id(@__retain_semantics Other renderMode)]
pub unsafe fn renderMode(&self) -> Retained<CAEmitterLayerRenderMode>;
#[method(setRenderMode:)]
pub unsafe fn setRenderMode(&self, render_mode: &CAEmitterLayerRenderMode);
#[method(preservesDepth)]
pub unsafe fn preservesDepth(&self) -> bool;
#[method(setPreservesDepth:)]
pub unsafe fn setPreservesDepth(&self, preserves_depth: bool);
#[method(velocity)]
pub unsafe fn velocity(&self) -> c_float;
#[method(setVelocity:)]
pub unsafe fn setVelocity(&self, velocity: c_float);
#[method(scale)]
pub unsafe fn scale(&self) -> c_float;
#[method(setScale:)]
pub unsafe fn setScale(&self, scale: c_float);
#[method(spin)]
pub unsafe fn spin(&self) -> c_float;
#[method(setSpin:)]
pub unsafe fn setSpin(&self, spin: c_float);
#[method(seed)]
pub unsafe fn seed(&self) -> c_uint;
#[method(setSeed:)]
pub unsafe fn setSeed(&self, seed: c_uint);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAEmitterLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAEmitterLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static kCAEmitterLayerPoint: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerLine: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerRectangle: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerCuboid: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerCircle: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerSphere: &'static CAEmitterLayerEmitterShape;
}
extern "C" {
pub static kCAEmitterLayerPoints: &'static CAEmitterLayerEmitterMode;
}
extern "C" {
pub static kCAEmitterLayerOutline: &'static CAEmitterLayerEmitterMode;
}
extern "C" {
pub static kCAEmitterLayerSurface: &'static CAEmitterLayerEmitterMode;
}
extern "C" {
pub static kCAEmitterLayerVolume: &'static CAEmitterLayerEmitterMode;
}
extern "C" {
pub static kCAEmitterLayerUnordered: &'static CAEmitterLayerRenderMode;
}
extern "C" {
pub static kCAEmitterLayerOldestFirst: &'static CAEmitterLayerRenderMode;
}
extern "C" {
pub static kCAEmitterLayerOldestLast: &'static CAEmitterLayerRenderMode;
}
extern "C" {
pub static kCAEmitterLayerBackToFront: &'static CAEmitterLayerRenderMode;
}
extern "C" {
pub static kCAEmitterLayerAdditive: &'static CAEmitterLayerRenderMode;
}

View File

@@ -0,0 +1,45 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CAFrameRateRange {
pub minimum: c_float,
pub maximum: c_float,
pub preferred: c_float,
}
unsafe impl Encode for CAFrameRateRange {
const ENCODING: Encoding = Encoding::Struct(
"CAFrameRateRange",
&[
<c_float>::ENCODING,
<c_float>::ENCODING,
<c_float>::ENCODING,
],
);
}
unsafe impl RefEncode for CAFrameRateRange {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static CAFrameRateRangeDefault: CAFrameRateRange;
}
extern "C" {
pub fn CAFrameRateRangeMake(
minimum: c_float,
maximum: c_float,
preferred: c_float,
) -> CAFrameRateRange;
}
extern "C" {
pub fn CAFrameRateRangeIsEqualToRange(range: CAFrameRateRange, other: CAFrameRateRange)
-> bool;
}

View File

@@ -0,0 +1,105 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAGradientLayerType = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAGradientLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAGradientLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAGradientLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAGradientLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAGradientLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAGradientLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAGradientLayer {
#[method_id(@__retain_semantics Other colors)]
pub unsafe fn colors(&self) -> Option<Retained<NSArray>>;
#[method(setColors:)]
pub unsafe fn setColors(&self, colors: Option<&NSArray>);
#[method_id(@__retain_semantics Other locations)]
pub unsafe fn locations(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setLocations:)]
pub unsafe fn setLocations(&self, locations: Option<&NSArray<NSNumber>>);
#[method(startPoint)]
pub unsafe fn startPoint(&self) -> CGPoint;
#[method(setStartPoint:)]
pub unsafe fn setStartPoint(&self, start_point: CGPoint);
#[method(endPoint)]
pub unsafe fn endPoint(&self) -> CGPoint;
#[method(setEndPoint:)]
pub unsafe fn setEndPoint(&self, end_point: CGPoint);
#[method_id(@__retain_semantics Other type)]
pub unsafe fn r#type(&self) -> Retained<CAGradientLayerType>;
#[method(setType:)]
pub unsafe fn setType(&self, r#type: &CAGradientLayerType);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAGradientLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAGradientLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static kCAGradientLayerAxial: &'static CAGradientLayerType;
}
extern "C" {
pub static kCAGradientLayerRadial: &'static CAGradientLayerType;
}
extern "C" {
pub static kCAGradientLayerConic: &'static CAGradientLayerType;
}

View File

@@ -0,0 +1,727 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CALayerContentsGravity = NSString;
// NS_TYPED_ENUM
pub type CALayerContentsFormat = NSString;
// NS_TYPED_ENUM
pub type CALayerContentsFilter = NSString;
// NS_TYPED_ENUM
pub type CALayerCornerCurve = NSString;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CAAutoresizingMask(pub c_uint);
bitflags::bitflags! {
impl CAAutoresizingMask: c_uint {
const kCALayerNotSizable = 0;
const kCALayerMinXMargin = 1<<0;
const kCALayerWidthSizable = 1<<1;
const kCALayerMaxXMargin = 1<<2;
const kCALayerMinYMargin = 1<<3;
const kCALayerHeightSizable = 1<<4;
const kCALayerMaxYMargin = 1<<5;
}
}
unsafe impl Encode for CAAutoresizingMask {
const ENCODING: Encoding = c_uint::ENCODING;
}
unsafe impl RefEncode for CAAutoresizingMask {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CAEdgeAntialiasingMask(pub c_uint);
bitflags::bitflags! {
impl CAEdgeAntialiasingMask: c_uint {
const kCALayerLeftEdge = 1<<0;
const kCALayerRightEdge = 1<<1;
const kCALayerBottomEdge = 1<<2;
const kCALayerTopEdge = 1<<3;
}
}
unsafe impl Encode for CAEdgeAntialiasingMask {
const ENCODING: Encoding = c_uint::ENCODING;
}
unsafe impl RefEncode for CAEdgeAntialiasingMask {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CACornerMask(pub NSUInteger);
bitflags::bitflags! {
impl CACornerMask: NSUInteger {
const kCALayerMinXMinYCorner = 1<<0;
const kCALayerMaxXMinYCorner = 1<<1;
const kCALayerMinXMaxYCorner = 1<<2;
const kCALayerMaxXMaxYCorner = 1<<3;
}
}
unsafe impl Encode for CACornerMask {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CACornerMask {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CALayer;
unsafe impl ClassType for CALayer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CAMediaTiming")]
unsafe impl CAMediaTiming for CALayer {}
unsafe impl NSCoding for CALayer {}
unsafe impl NSObjectProtocol for CALayer {}
unsafe impl NSSecureCoding for CALayer {}
extern_methods!(
unsafe impl CALayer {
#[method_id(@__retain_semantics Other layer)]
pub fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
#[method_id(@__retain_semantics Other presentationLayer)]
pub unsafe fn presentationLayer(&self) -> Option<Retained<Self>>;
#[method_id(@__retain_semantics Other modelLayer)]
pub unsafe fn modelLayer(&self) -> Retained<Self>;
#[method_id(@__retain_semantics Other defaultValueForKey:)]
pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
#[method(needsDisplayForKey:)]
pub unsafe fn needsDisplayForKey(key: &NSString) -> bool;
#[method(shouldArchiveValueForKey:)]
pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;
#[method(bounds)]
pub fn bounds(&self) -> CGRect;
#[method(setBounds:)]
pub fn setBounds(&self, bounds: CGRect);
#[method(position)]
pub fn position(&self) -> CGPoint;
#[method(setPosition:)]
pub fn setPosition(&self, position: CGPoint);
#[method(zPosition)]
pub fn zPosition(&self) -> CGFloat;
#[method(setZPosition:)]
pub fn setZPosition(&self, z_position: CGFloat);
#[method(anchorPoint)]
pub fn anchorPoint(&self) -> CGPoint;
#[method(setAnchorPoint:)]
pub fn setAnchorPoint(&self, anchor_point: CGPoint);
#[method(anchorPointZ)]
pub fn anchorPointZ(&self) -> CGFloat;
#[method(setAnchorPointZ:)]
pub fn setAnchorPointZ(&self, anchor_point_z: CGFloat);
#[cfg(feature = "CATransform3D")]
#[method(transform)]
pub fn transform(&self) -> CATransform3D;
#[cfg(feature = "CATransform3D")]
#[method(setTransform:)]
pub fn setTransform(&self, transform: CATransform3D);
#[method(frame)]
pub fn frame(&self) -> CGRect;
#[method(setFrame:)]
pub fn setFrame(&self, frame: CGRect);
#[method(isHidden)]
pub fn isHidden(&self) -> bool;
#[method(setHidden:)]
pub fn setHidden(&self, hidden: bool);
#[method(isDoubleSided)]
pub fn isDoubleSided(&self) -> bool;
#[method(setDoubleSided:)]
pub fn setDoubleSided(&self, double_sided: bool);
#[method(isGeometryFlipped)]
pub fn isGeometryFlipped(&self) -> bool;
#[method(setGeometryFlipped:)]
pub fn setGeometryFlipped(&self, geometry_flipped: bool);
#[method(contentsAreFlipped)]
pub fn contentsAreFlipped(&self) -> bool;
#[method_id(@__retain_semantics Other superlayer)]
pub fn superlayer(&self) -> Option<Retained<CALayer>>;
#[method(removeFromSuperlayer)]
pub fn removeFromSuperlayer(&self);
#[method_id(@__retain_semantics Other sublayers)]
pub unsafe fn sublayers(&self) -> Option<Retained<NSArray<CALayer>>>;
#[method(setSublayers:)]
pub unsafe fn setSublayers(&self, sublayers: Option<&NSArray<CALayer>>);
#[method(addSublayer:)]
pub fn addSublayer(&self, layer: &CALayer);
#[method(insertSublayer:atIndex:)]
pub fn insertSublayer_atIndex(&self, layer: &CALayer, idx: c_uint);
#[method(insertSublayer:below:)]
pub fn insertSublayer_below(&self, layer: &CALayer, sibling: Option<&CALayer>);
#[method(insertSublayer:above:)]
pub fn insertSublayer_above(&self, layer: &CALayer, sibling: Option<&CALayer>);
#[method(replaceSublayer:with:)]
pub unsafe fn replaceSublayer_with(&self, old_layer: &CALayer, new_layer: &CALayer);
#[cfg(feature = "CATransform3D")]
#[method(sublayerTransform)]
pub fn sublayerTransform(&self) -> CATransform3D;
#[cfg(feature = "CATransform3D")]
#[method(setSublayerTransform:)]
pub fn setSublayerTransform(&self, sublayer_transform: CATransform3D);
#[method_id(@__retain_semantics Other mask)]
pub fn mask(&self) -> Option<Retained<CALayer>>;
#[method(setMask:)]
pub unsafe fn setMask(&self, mask: Option<&CALayer>);
#[method(masksToBounds)]
pub fn masksToBounds(&self) -> bool;
#[method(setMasksToBounds:)]
pub fn setMasksToBounds(&self, masks_to_bounds: bool);
#[method(convertPoint:fromLayer:)]
pub fn convertPoint_fromLayer(&self, p: CGPoint, l: Option<&CALayer>) -> CGPoint;
#[method(convertPoint:toLayer:)]
pub fn convertPoint_toLayer(&self, p: CGPoint, l: Option<&CALayer>) -> CGPoint;
#[method(convertRect:fromLayer:)]
pub fn convertRect_fromLayer(&self, r: CGRect, l: Option<&CALayer>) -> CGRect;
#[method(convertRect:toLayer:)]
pub fn convertRect_toLayer(&self, r: CGRect, l: Option<&CALayer>) -> CGRect;
#[method(convertTime:fromLayer:)]
pub fn convertTime_fromLayer(
&self,
t: CFTimeInterval,
l: Option<&CALayer>,
) -> CFTimeInterval;
#[method(convertTime:toLayer:)]
pub fn convertTime_toLayer(&self, t: CFTimeInterval, l: Option<&CALayer>)
-> CFTimeInterval;
#[method_id(@__retain_semantics Other hitTest:)]
pub fn hitTest(&self, p: CGPoint) -> Option<Retained<CALayer>>;
#[method(containsPoint:)]
pub fn containsPoint(&self, p: CGPoint) -> bool;
#[method_id(@__retain_semantics Other contents)]
pub unsafe fn contents(&self) -> Option<Retained<AnyObject>>;
#[method(setContents:)]
pub unsafe fn setContents(&self, contents: Option<&AnyObject>);
#[method(contentsRect)]
pub fn contentsRect(&self) -> CGRect;
#[method(setContentsRect:)]
pub fn setContentsRect(&self, contents_rect: CGRect);
#[method_id(@__retain_semantics Other contentsGravity)]
pub fn contentsGravity(&self) -> Retained<CALayerContentsGravity>;
#[method(setContentsGravity:)]
pub fn setContentsGravity(&self, contents_gravity: &CALayerContentsGravity);
#[method(contentsScale)]
pub fn contentsScale(&self) -> CGFloat;
#[method(setContentsScale:)]
pub fn setContentsScale(&self, contents_scale: CGFloat);
#[method(contentsCenter)]
pub fn contentsCenter(&self) -> CGRect;
#[method(setContentsCenter:)]
pub fn setContentsCenter(&self, contents_center: CGRect);
#[method_id(@__retain_semantics Other contentsFormat)]
pub fn contentsFormat(&self) -> Retained<CALayerContentsFormat>;
#[method(setContentsFormat:)]
pub fn setContentsFormat(&self, contents_format: &CALayerContentsFormat);
#[method(wantsExtendedDynamicRangeContent)]
pub unsafe fn wantsExtendedDynamicRangeContent(&self) -> bool;
#[method(setWantsExtendedDynamicRangeContent:)]
pub unsafe fn setWantsExtendedDynamicRangeContent(
&self,
wants_extended_dynamic_range_content: bool,
);
#[method_id(@__retain_semantics Other minificationFilter)]
pub fn minificationFilter(&self) -> Retained<CALayerContentsFilter>;
#[method(setMinificationFilter:)]
pub fn setMinificationFilter(&self, minification_filter: &CALayerContentsFilter);
#[method_id(@__retain_semantics Other magnificationFilter)]
pub fn magnificationFilter(&self) -> Retained<CALayerContentsFilter>;
#[method(setMagnificationFilter:)]
pub fn setMagnificationFilter(&self, magnification_filter: &CALayerContentsFilter);
#[method(minificationFilterBias)]
pub fn minificationFilterBias(&self) -> c_float;
#[method(setMinificationFilterBias:)]
pub fn setMinificationFilterBias(&self, minification_filter_bias: c_float);
#[method(isOpaque)]
pub fn isOpaque(&self) -> bool;
#[method(setOpaque:)]
pub fn setOpaque(&self, opaque: bool);
#[method(display)]
pub fn display(&self);
#[method(setNeedsDisplay)]
pub fn setNeedsDisplay(&self);
#[method(setNeedsDisplayInRect:)]
pub fn setNeedsDisplayInRect(&self, r: CGRect);
#[method(needsDisplay)]
pub fn needsDisplay(&self) -> bool;
#[method(displayIfNeeded)]
pub fn displayIfNeeded(&self);
#[method(needsDisplayOnBoundsChange)]
pub fn needsDisplayOnBoundsChange(&self) -> bool;
#[method(setNeedsDisplayOnBoundsChange:)]
pub fn setNeedsDisplayOnBoundsChange(&self, needs_display_on_bounds_change: bool);
#[method(drawsAsynchronously)]
pub fn drawsAsynchronously(&self) -> bool;
#[method(setDrawsAsynchronously:)]
pub fn setDrawsAsynchronously(&self, draws_asynchronously: bool);
#[method(edgeAntialiasingMask)]
pub fn edgeAntialiasingMask(&self) -> CAEdgeAntialiasingMask;
#[method(setEdgeAntialiasingMask:)]
pub fn setEdgeAntialiasingMask(&self, edge_antialiasing_mask: CAEdgeAntialiasingMask);
#[method(allowsEdgeAntialiasing)]
pub fn allowsEdgeAntialiasing(&self) -> bool;
#[method(setAllowsEdgeAntialiasing:)]
pub fn setAllowsEdgeAntialiasing(&self, allows_edge_antialiasing: bool);
#[method(cornerRadius)]
pub fn cornerRadius(&self) -> CGFloat;
#[method(setCornerRadius:)]
pub fn setCornerRadius(&self, corner_radius: CGFloat);
#[method(maskedCorners)]
pub fn maskedCorners(&self) -> CACornerMask;
#[method(setMaskedCorners:)]
pub fn setMaskedCorners(&self, masked_corners: CACornerMask);
#[method_id(@__retain_semantics Other cornerCurve)]
pub fn cornerCurve(&self) -> Retained<CALayerCornerCurve>;
#[method(setCornerCurve:)]
pub fn setCornerCurve(&self, corner_curve: &CALayerCornerCurve);
#[method(cornerCurveExpansionFactor:)]
pub fn cornerCurveExpansionFactor(curve: &CALayerCornerCurve) -> CGFloat;
#[method(borderWidth)]
pub fn borderWidth(&self) -> CGFloat;
#[method(setBorderWidth:)]
pub fn setBorderWidth(&self, border_width: CGFloat);
#[method(opacity)]
pub fn opacity(&self) -> c_float;
#[method(setOpacity:)]
pub fn setOpacity(&self, opacity: c_float);
#[method(allowsGroupOpacity)]
pub fn allowsGroupOpacity(&self) -> bool;
#[method(setAllowsGroupOpacity:)]
pub fn setAllowsGroupOpacity(&self, allows_group_opacity: bool);
#[method_id(@__retain_semantics Other compositingFilter)]
pub unsafe fn compositingFilter(&self) -> Option<Retained<AnyObject>>;
#[method(setCompositingFilter:)]
pub unsafe fn setCompositingFilter(&self, compositing_filter: Option<&AnyObject>);
#[method_id(@__retain_semantics Other filters)]
pub unsafe fn filters(&self) -> Option<Retained<NSArray>>;
#[method(setFilters:)]
pub unsafe fn setFilters(&self, filters: Option<&NSArray>);
#[method_id(@__retain_semantics Other backgroundFilters)]
pub unsafe fn backgroundFilters(&self) -> Option<Retained<NSArray>>;
#[method(setBackgroundFilters:)]
pub unsafe fn setBackgroundFilters(&self, background_filters: Option<&NSArray>);
#[method(shouldRasterize)]
pub fn shouldRasterize(&self) -> bool;
#[method(setShouldRasterize:)]
pub fn setShouldRasterize(&self, should_rasterize: bool);
#[method(rasterizationScale)]
pub fn rasterizationScale(&self) -> CGFloat;
#[method(setRasterizationScale:)]
pub fn setRasterizationScale(&self, rasterization_scale: CGFloat);
#[method(shadowOpacity)]
pub fn shadowOpacity(&self) -> c_float;
#[method(setShadowOpacity:)]
pub fn setShadowOpacity(&self, shadow_opacity: c_float);
#[method(shadowOffset)]
pub fn shadowOffset(&self) -> CGSize;
#[method(setShadowOffset:)]
pub fn setShadowOffset(&self, shadow_offset: CGSize);
#[method(shadowRadius)]
pub fn shadowRadius(&self) -> CGFloat;
#[method(setShadowRadius:)]
pub fn setShadowRadius(&self, shadow_radius: CGFloat);
#[method(autoresizingMask)]
pub fn autoresizingMask(&self) -> CAAutoresizingMask;
#[method(setAutoresizingMask:)]
pub fn setAutoresizingMask(&self, autoresizing_mask: CAAutoresizingMask);
#[method_id(@__retain_semantics Other layoutManager)]
pub fn layoutManager(&self) -> Option<Retained<ProtocolObject<dyn CALayoutManager>>>;
#[method(setLayoutManager:)]
pub fn setLayoutManager(
&self,
layout_manager: Option<&ProtocolObject<dyn CALayoutManager>>,
);
#[method(preferredFrameSize)]
pub fn preferredFrameSize(&self) -> CGSize;
#[method(setNeedsLayout)]
pub fn setNeedsLayout(&self);
#[method(needsLayout)]
pub fn needsLayout(&self) -> bool;
#[method(layoutIfNeeded)]
pub fn layoutIfNeeded(&self);
#[method(layoutSublayers)]
pub fn layoutSublayers(&self);
#[method(resizeSublayersWithOldSize:)]
pub fn resizeSublayersWithOldSize(&self, size: CGSize);
#[method(resizeWithOldSuperlayerSize:)]
pub fn resizeWithOldSuperlayerSize(&self, size: CGSize);
#[method_id(@__retain_semantics Other defaultActionForKey:)]
pub fn defaultActionForKey(
event: &NSString,
) -> Option<Retained<ProtocolObject<dyn CAAction>>>;
#[method_id(@__retain_semantics Other actionForKey:)]
pub fn actionForKey(
&self,
event: &NSString,
) -> Option<Retained<ProtocolObject<dyn CAAction>>>;
#[method_id(@__retain_semantics Other actions)]
pub fn actions(
&self,
) -> Option<Retained<NSDictionary<NSString, ProtocolObject<dyn CAAction>>>>;
#[method(setActions:)]
pub fn setActions(
&self,
actions: Option<&NSDictionary<NSString, ProtocolObject<dyn CAAction>>>,
);
#[cfg(feature = "CAAnimation")]
#[method(addAnimation:forKey:)]
pub fn addAnimation_forKey(&self, anim: &CAAnimation, key: Option<&NSString>);
#[method(removeAllAnimations)]
pub fn removeAllAnimations(&self);
#[method(removeAnimationForKey:)]
pub fn removeAnimationForKey(&self, key: &NSString);
#[method_id(@__retain_semantics Other animationKeys)]
pub fn animationKeys(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "CAAnimation")]
#[method_id(@__retain_semantics Other animationForKey:)]
pub unsafe fn animationForKey(&self, key: &NSString) -> Option<Retained<CAAnimation>>;
#[method_id(@__retain_semantics Other name)]
pub fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub fn setName(&self, name: Option<&NSString>);
#[method_id(@__retain_semantics Other delegate)]
pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn CALayerDelegate>>>;
#[method(setDelegate:)]
pub fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn CALayerDelegate>>);
#[method_id(@__retain_semantics Other style)]
pub unsafe fn style(&self) -> Option<Retained<NSDictionary>>;
#[method(setStyle:)]
pub unsafe fn setStyle(&self, style: Option<&NSDictionary>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CALayer {
#[method_id(@__retain_semantics New new)]
pub fn new() -> Retained<Self>;
}
);
impl DefaultRetained for CALayer {
#[inline]
fn default_id() -> Retained<Self> {
Self::new()
}
}
extern_protocol!(
pub unsafe trait CALayoutManager: NSObjectProtocol {
#[optional]
#[method(preferredSizeOfLayer:)]
unsafe fn preferredSizeOfLayer(&self, layer: &CALayer) -> CGSize;
#[optional]
#[method(invalidateLayoutOfLayer:)]
unsafe fn invalidateLayoutOfLayer(&self, layer: &CALayer);
#[optional]
#[method(layoutSublayersOfLayer:)]
unsafe fn layoutSublayersOfLayer(&self, layer: &CALayer);
}
unsafe impl ProtocolType for dyn CALayoutManager {}
);
extern_protocol!(
pub unsafe trait CAAction {
#[method(runActionForKey:object:arguments:)]
unsafe fn runActionForKey_object_arguments(
&self,
event: &NSString,
an_object: &AnyObject,
dict: Option<&NSDictionary>,
);
}
unsafe impl ProtocolType for dyn CAAction {}
);
unsafe impl CAAction for NSNull {}
extern_protocol!(
pub unsafe trait CALayerDelegate: NSObjectProtocol {
#[optional]
#[method(displayLayer:)]
unsafe fn displayLayer(&self, layer: &CALayer);
#[optional]
#[method(layerWillDraw:)]
unsafe fn layerWillDraw(&self, layer: &CALayer);
#[optional]
#[method(layoutSublayersOfLayer:)]
unsafe fn layoutSublayersOfLayer(&self, layer: &CALayer);
#[optional]
#[method_id(@__retain_semantics Other actionForLayer:forKey:)]
unsafe fn actionForLayer_forKey(
&self,
layer: &CALayer,
event: &NSString,
) -> Option<Retained<ProtocolObject<dyn CAAction>>>;
}
unsafe impl ProtocolType for dyn CALayerDelegate {}
);
extern "C" {
pub static kCAGravityCenter: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityTop: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityBottom: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityLeft: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityRight: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityTopLeft: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityTopRight: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityBottomLeft: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityBottomRight: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityResize: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityResizeAspect: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAGravityResizeAspectFill: &'static CALayerContentsGravity;
}
extern "C" {
pub static kCAContentsFormatRGBA8Uint: &'static CALayerContentsFormat;
}
extern "C" {
pub static kCAContentsFormatRGBA16Float: &'static CALayerContentsFormat;
}
extern "C" {
pub static kCAContentsFormatGray8Uint: &'static CALayerContentsFormat;
}
extern "C" {
pub static kCAFilterNearest: &'static CALayerContentsFilter;
}
extern "C" {
pub static kCAFilterLinear: &'static CALayerContentsFilter;
}
extern "C" {
pub static kCAFilterTrilinear: &'static CALayerContentsFilter;
}
extern "C" {
pub static kCACornerCurveCircular: &'static CALayerCornerCurve;
}
extern "C" {
pub static kCACornerCurveContinuous: &'static CALayerCornerCurve;
}
extern "C" {
pub static kCAOnOrderIn: &'static NSString;
}
extern "C" {
pub static kCAOnOrderOut: &'static NSString;
}
extern "C" {
pub static kCATransition: &'static NSString;
}

View File

@@ -0,0 +1,79 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAMediaTimingFillMode = NSString;
extern_protocol!(
pub unsafe trait CAMediaTiming {
#[method(beginTime)]
unsafe fn beginTime(&self) -> CFTimeInterval;
#[method(setBeginTime:)]
unsafe fn setBeginTime(&self, begin_time: CFTimeInterval);
#[method(duration)]
unsafe fn duration(&self) -> CFTimeInterval;
#[method(setDuration:)]
unsafe fn setDuration(&self, duration: CFTimeInterval);
#[method(speed)]
unsafe fn speed(&self) -> c_float;
#[method(setSpeed:)]
unsafe fn setSpeed(&self, speed: c_float);
#[method(timeOffset)]
unsafe fn timeOffset(&self) -> CFTimeInterval;
#[method(setTimeOffset:)]
unsafe fn setTimeOffset(&self, time_offset: CFTimeInterval);
#[method(repeatCount)]
unsafe fn repeatCount(&self) -> c_float;
#[method(setRepeatCount:)]
unsafe fn setRepeatCount(&self, repeat_count: c_float);
#[method(repeatDuration)]
unsafe fn repeatDuration(&self) -> CFTimeInterval;
#[method(setRepeatDuration:)]
unsafe fn setRepeatDuration(&self, repeat_duration: CFTimeInterval);
#[method(autoreverses)]
unsafe fn autoreverses(&self) -> bool;
#[method(setAutoreverses:)]
unsafe fn setAutoreverses(&self, autoreverses: bool);
#[method_id(@__retain_semantics Other fillMode)]
unsafe fn fillMode(&self) -> Retained<CAMediaTimingFillMode>;
#[method(setFillMode:)]
unsafe fn setFillMode(&self, fill_mode: &CAMediaTimingFillMode);
}
unsafe impl ProtocolType for dyn CAMediaTiming {}
);
extern "C" {
pub static kCAFillModeForwards: &'static CAMediaTimingFillMode;
}
extern "C" {
pub static kCAFillModeBackwards: &'static CAMediaTimingFillMode;
}
extern "C" {
pub static kCAFillModeBoth: &'static CAMediaTimingFillMode;
}
extern "C" {
pub static kCAFillModeRemoved: &'static CAMediaTimingFillMode;
}

View File

@@ -0,0 +1,80 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAMediaTimingFunctionName = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAMediaTimingFunction;
unsafe impl ClassType for CAMediaTimingFunction {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CAMediaTimingFunction {}
unsafe impl NSObjectProtocol for CAMediaTimingFunction {}
unsafe impl NSSecureCoding for CAMediaTimingFunction {}
extern_methods!(
unsafe impl CAMediaTimingFunction {
#[method_id(@__retain_semantics Other functionWithName:)]
pub unsafe fn functionWithName(name: &CAMediaTimingFunctionName) -> Retained<Self>;
#[method_id(@__retain_semantics Other functionWithControlPoints::::)]
pub unsafe fn functionWithControlPoints(
c1x: c_float,
c1y: c_float,
c2x: c_float,
c2y: c_float,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithControlPoints::::)]
pub unsafe fn initWithControlPoints(
this: Allocated<Self>,
c1x: c_float,
c1y: c_float,
c2x: c_float,
c2y: c_float,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAMediaTimingFunction {
#[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 "C" {
pub static kCAMediaTimingFunctionLinear: &'static CAMediaTimingFunctionName;
}
extern "C" {
pub static kCAMediaTimingFunctionEaseIn: &'static CAMediaTimingFunctionName;
}
extern "C" {
pub static kCAMediaTimingFunctionEaseOut: &'static CAMediaTimingFunctionName;
}
extern "C" {
pub static kCAMediaTimingFunctionEaseInEaseOut: &'static CAMediaTimingFunctionName;
}
extern "C" {
pub static kCAMediaTimingFunctionDefault: &'static CAMediaTimingFunctionName;
}

View File

@@ -0,0 +1,135 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-metal")]
use objc2_metal::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAMetalDisplayLinkUpdate;
unsafe impl ClassType for CAMetalDisplayLinkUpdate {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CAMetalDisplayLinkUpdate {}
extern_methods!(
unsafe impl CAMetalDisplayLinkUpdate {
#[cfg(all(feature = "CAMetalLayer", feature = "objc2-metal"))]
#[method_id(@__retain_semantics Other drawable)]
pub unsafe fn drawable(&self) -> Retained<ProtocolObject<dyn CAMetalDrawable>>;
#[method(targetTimestamp)]
pub unsafe fn targetTimestamp(&self) -> CFTimeInterval;
#[method(targetPresentationTimestamp)]
pub unsafe fn targetPresentationTimestamp(&self) -> CFTimeInterval;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAMetalDisplayLinkUpdate {
#[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_protocol!(
pub unsafe trait CAMetalDisplayLinkDelegate {
#[method(metalDisplayLink:needsUpdate:)]
unsafe fn metalDisplayLink_needsUpdate(
&self,
link: &CAMetalDisplayLink,
update: &CAMetalDisplayLinkUpdate,
);
}
unsafe impl ProtocolType for dyn CAMetalDisplayLinkDelegate {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAMetalDisplayLink;
unsafe impl ClassType for CAMetalDisplayLink {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CAMetalDisplayLink {}
extern_methods!(
unsafe impl CAMetalDisplayLink {
#[cfg(all(feature = "CALayer", feature = "CAMetalLayer"))]
#[method_id(@__retain_semantics Init initWithMetalLayer:)]
pub unsafe fn initWithMetalLayer(
this: Allocated<Self>,
layer: &CAMetalLayer,
) -> Retained<Self>;
#[method(addToRunLoop:forMode:)]
pub unsafe fn addToRunLoop_forMode(&self, runloop: &NSRunLoop, mode: &NSRunLoopMode);
#[method(removeFromRunLoop:forMode:)]
pub unsafe fn removeFromRunLoop_forMode(&self, runloop: &NSRunLoop, mode: &NSRunLoopMode);
#[method(invalidate)]
pub unsafe fn invalidate(&self);
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn CAMetalDisplayLinkDelegate>>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CAMetalDisplayLinkDelegate>>,
);
#[method(preferredFrameLatency)]
pub unsafe fn preferredFrameLatency(&self) -> c_float;
#[method(setPreferredFrameLatency:)]
pub unsafe fn setPreferredFrameLatency(&self, preferred_frame_latency: c_float);
#[cfg(feature = "CAFrameRateRange")]
#[method(preferredFrameRateRange)]
pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;
#[cfg(feature = "CAFrameRateRange")]
#[method(setPreferredFrameRateRange:)]
pub unsafe fn setPreferredFrameRateRange(
&self,
preferred_frame_rate_range: CAFrameRateRange,
);
#[method(isPaused)]
pub unsafe fn isPaused(&self) -> bool;
#[method(setPaused:)]
pub unsafe fn setPaused(&self, paused: bool);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAMetalDisplayLink {
#[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>;
}
);

View File

@@ -0,0 +1,163 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-metal")]
use objc2_metal::*;
use crate::*;
extern_protocol!(
#[cfg(feature = "objc2-metal")]
pub unsafe trait CAMetalDrawable: MTLDrawable {
#[method_id(@__retain_semantics Other texture)]
unsafe fn texture(&self) -> Retained<ProtocolObject<dyn MTLTexture>>;
#[cfg(feature = "CALayer")]
#[method_id(@__retain_semantics Other layer)]
unsafe fn layer(&self) -> Retained<CAMetalLayer>;
}
#[cfg(feature = "objc2-metal")]
unsafe impl ProtocolType for dyn CAMetalDrawable {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAMetalLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAMetalLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAMetalLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAMetalLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAMetalLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAMetalLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAMetalLayer {
#[cfg(feature = "objc2-metal")]
#[method_id(@__retain_semantics Other device)]
pub unsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn MTLDevice>>>;
#[cfg(feature = "objc2-metal")]
#[method(setDevice:)]
pub unsafe fn setDevice(&self, device: Option<&ProtocolObject<dyn MTLDevice>>);
#[cfg(feature = "objc2-metal")]
#[method_id(@__retain_semantics Other preferredDevice)]
pub unsafe fn preferredDevice(&self) -> Option<Retained<ProtocolObject<dyn MTLDevice>>>;
#[cfg(feature = "objc2-metal")]
#[method(pixelFormat)]
pub unsafe fn pixelFormat(&self) -> MTLPixelFormat;
#[cfg(feature = "objc2-metal")]
#[method(setPixelFormat:)]
pub unsafe fn setPixelFormat(&self, pixel_format: MTLPixelFormat);
#[method(framebufferOnly)]
pub unsafe fn framebufferOnly(&self) -> bool;
#[method(setFramebufferOnly:)]
pub unsafe fn setFramebufferOnly(&self, framebuffer_only: bool);
#[method(drawableSize)]
pub unsafe fn drawableSize(&self) -> CGSize;
#[method(setDrawableSize:)]
pub unsafe fn setDrawableSize(&self, drawable_size: CGSize);
#[cfg(feature = "objc2-metal")]
#[method_id(@__retain_semantics Other nextDrawable)]
pub unsafe fn nextDrawable(&self) -> Option<Retained<ProtocolObject<dyn CAMetalDrawable>>>;
#[method(maximumDrawableCount)]
pub unsafe fn maximumDrawableCount(&self) -> NSUInteger;
#[method(setMaximumDrawableCount:)]
pub unsafe fn setMaximumDrawableCount(&self, maximum_drawable_count: NSUInteger);
#[method(presentsWithTransaction)]
pub unsafe fn presentsWithTransaction(&self) -> bool;
#[method(setPresentsWithTransaction:)]
pub unsafe fn setPresentsWithTransaction(&self, presents_with_transaction: bool);
#[method(wantsExtendedDynamicRangeContent)]
pub unsafe fn wantsExtendedDynamicRangeContent(&self) -> bool;
#[method(setWantsExtendedDynamicRangeContent:)]
pub unsafe fn setWantsExtendedDynamicRangeContent(
&self,
wants_extended_dynamic_range_content: bool,
);
#[cfg(feature = "CAEDRMetadata")]
#[method_id(@__retain_semantics Other EDRMetadata)]
pub unsafe fn EDRMetadata(&self) -> Option<Retained<CAEDRMetadata>>;
#[cfg(feature = "CAEDRMetadata")]
#[method(setEDRMetadata:)]
pub unsafe fn setEDRMetadata(&self, edr_metadata: Option<&CAEDRMetadata>);
#[method(displaySyncEnabled)]
pub unsafe fn displaySyncEnabled(&self) -> bool;
#[method(setDisplaySyncEnabled:)]
pub unsafe fn setDisplaySyncEnabled(&self, display_sync_enabled: bool);
#[method(allowsNextDrawableTimeout)]
pub unsafe fn allowsNextDrawableTimeout(&self) -> bool;
#[method(setAllowsNextDrawableTimeout:)]
pub unsafe fn setAllowsNextDrawableTimeout(&self, allows_next_drawable_timeout: bool);
#[method_id(@__retain_semantics Other developerHUDProperties)]
pub unsafe fn developerHUDProperties(&self) -> Option<Retained<NSDictionary>>;
#[method(setDeveloperHUDProperties:)]
pub unsafe fn setDeveloperHUDProperties(
&self,
developer_hud_properties: Option<&NSDictionary>,
);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAMetalLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAMetalLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,46 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CARemoteLayerClient;
unsafe impl ClassType for CARemoteLayerClient {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CARemoteLayerClient {}
extern_methods!(
unsafe impl CARemoteLayerClient {
#[method(invalidate)]
pub unsafe fn invalidate(&self);
#[method(clientId)]
pub unsafe fn clientId(&self) -> u32;
#[cfg(feature = "CALayer")]
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer(&self) -> Option<Retained<CALayer>>;
#[cfg(feature = "CALayer")]
#[method(setLayer:)]
pub unsafe fn setLayer(&self, layer: Option<&CALayer>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CARemoteLayerClient {
#[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>;
}
);

View File

@@ -0,0 +1,44 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CARemoteLayerServer;
unsafe impl ClassType for CARemoteLayerServer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CARemoteLayerServer {}
extern_methods!(
unsafe impl CARemoteLayerServer {
#[method_id(@__retain_semantics Other sharedServer)]
pub unsafe fn sharedServer() -> Retained<CARemoteLayerServer>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CARemoteLayerServer {
#[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_methods!(
/// CARemoteLayerServer
#[cfg(feature = "CALayer")]
unsafe impl CALayer {
#[method_id(@__retain_semantics Other layerWithRemoteClientId:)]
pub unsafe fn layerWithRemoteClientId(client_id: u32) -> Retained<CALayer>;
}
);

View File

@@ -0,0 +1,77 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CARenderer;
unsafe impl ClassType for CARenderer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CARenderer {}
extern_methods!(
unsafe impl CARenderer {
#[deprecated = "+rendererWithMTLTexture"]
#[method_id(@__retain_semantics Other rendererWithCGLContext:options:)]
pub unsafe fn rendererWithCGLContext_options(
ctx: NonNull<c_void>,
dict: Option<&NSDictionary>,
) -> Retained<CARenderer>;
#[cfg(feature = "CALayer")]
#[method_id(@__retain_semantics Other layer)]
pub fn layer(&self) -> Option<Retained<CALayer>>;
#[cfg(feature = "CALayer")]
#[method(setLayer:)]
pub fn setLayer(&self, layer: Option<&CALayer>);
#[method(bounds)]
pub fn bounds(&self) -> CGRect;
#[method(setBounds:)]
pub fn setBounds(&self, bounds: CGRect);
#[method(updateBounds)]
pub fn updateBounds(&self) -> CGRect;
#[method(addUpdateRect:)]
pub fn addUpdateRect(&self, r: CGRect);
#[method(render)]
pub fn render(&self);
#[method(nextFrameTime)]
pub fn nextFrameTime(&self) -> CFTimeInterval;
#[method(endFrame)]
pub fn endFrame(&self);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CARenderer {
#[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 "C" {
pub static kCARendererColorSpace: &'static NSString;
}
extern "C" {
pub static kCARendererMetalCommandQueue: &'static NSString;
}

View File

@@ -0,0 +1,110 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAReplicatorLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAReplicatorLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAReplicatorLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAReplicatorLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAReplicatorLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAReplicatorLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAReplicatorLayer {
#[method(instanceCount)]
pub unsafe fn instanceCount(&self) -> NSInteger;
#[method(setInstanceCount:)]
pub unsafe fn setInstanceCount(&self, instance_count: NSInteger);
#[method(preservesDepth)]
pub unsafe fn preservesDepth(&self) -> bool;
#[method(setPreservesDepth:)]
pub unsafe fn setPreservesDepth(&self, preserves_depth: bool);
#[method(instanceDelay)]
pub unsafe fn instanceDelay(&self) -> CFTimeInterval;
#[method(setInstanceDelay:)]
pub unsafe fn setInstanceDelay(&self, instance_delay: CFTimeInterval);
#[cfg(feature = "CATransform3D")]
#[method(instanceTransform)]
pub unsafe fn instanceTransform(&self) -> CATransform3D;
#[cfg(feature = "CATransform3D")]
#[method(setInstanceTransform:)]
pub unsafe fn setInstanceTransform(&self, instance_transform: CATransform3D);
#[method(instanceRedOffset)]
pub unsafe fn instanceRedOffset(&self) -> c_float;
#[method(setInstanceRedOffset:)]
pub unsafe fn setInstanceRedOffset(&self, instance_red_offset: c_float);
#[method(instanceGreenOffset)]
pub unsafe fn instanceGreenOffset(&self) -> c_float;
#[method(setInstanceGreenOffset:)]
pub unsafe fn setInstanceGreenOffset(&self, instance_green_offset: c_float);
#[method(instanceBlueOffset)]
pub unsafe fn instanceBlueOffset(&self) -> c_float;
#[method(setInstanceBlueOffset:)]
pub unsafe fn setInstanceBlueOffset(&self, instance_blue_offset: c_float);
#[method(instanceAlphaOffset)]
pub unsafe fn instanceAlphaOffset(&self) -> c_float;
#[method(setInstanceAlphaOffset:)]
pub unsafe fn setInstanceAlphaOffset(&self, instance_alpha_offset: c_float);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAReplicatorLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAReplicatorLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,106 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAScrollLayerScrollMode = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAScrollLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAScrollLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAScrollLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAScrollLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAScrollLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAScrollLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAScrollLayer {
#[method(scrollToPoint:)]
pub unsafe fn scrollToPoint(&self, p: CGPoint);
#[method(scrollToRect:)]
pub unsafe fn scrollToRect(&self, r: CGRect);
#[method_id(@__retain_semantics Other scrollMode)]
pub unsafe fn scrollMode(&self) -> Retained<CAScrollLayerScrollMode>;
#[method(setScrollMode:)]
pub unsafe fn setScrollMode(&self, scroll_mode: &CAScrollLayerScrollMode);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAScrollLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAScrollLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
/// CALayerScrolling
#[cfg(feature = "CALayer")]
unsafe impl CALayer {
#[method(scrollPoint:)]
pub unsafe fn scrollPoint(&self, p: CGPoint);
#[method(scrollRectToVisible:)]
pub unsafe fn scrollRectToVisible(&self, r: CGRect);
#[method(visibleRect)]
pub unsafe fn visibleRect(&self) -> CGRect;
}
);
extern "C" {
pub static kCAScrollNone: &'static CAScrollLayerScrollMode;
}
extern "C" {
pub static kCAScrollVertically: &'static CAScrollLayerScrollMode;
}
extern "C" {
pub static kCAScrollHorizontally: &'static CAScrollLayerScrollMode;
}
extern "C" {
pub static kCAScrollBoth: &'static CAScrollLayerScrollMode;
}

View File

@@ -0,0 +1,155 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAShapeLayerFillRule = NSString;
// NS_TYPED_ENUM
pub type CAShapeLayerLineJoin = NSString;
// NS_TYPED_ENUM
pub type CAShapeLayerLineCap = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAShapeLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAShapeLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAShapeLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics Other fillRule)]
pub unsafe fn fillRule(&self) -> Retained<CAShapeLayerFillRule>;
#[method(setFillRule:)]
pub unsafe fn setFillRule(&self, fill_rule: &CAShapeLayerFillRule);
#[method(strokeStart)]
pub unsafe fn strokeStart(&self) -> CGFloat;
#[method(setStrokeStart:)]
pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat);
#[method(strokeEnd)]
pub unsafe fn strokeEnd(&self) -> CGFloat;
#[method(setStrokeEnd:)]
pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat);
#[method(lineWidth)]
pub unsafe fn lineWidth(&self) -> CGFloat;
#[method(setLineWidth:)]
pub unsafe fn setLineWidth(&self, line_width: CGFloat);
#[method(miterLimit)]
pub unsafe fn miterLimit(&self) -> CGFloat;
#[method(setMiterLimit:)]
pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat);
#[method_id(@__retain_semantics Other lineCap)]
pub unsafe fn lineCap(&self) -> Retained<CAShapeLayerLineCap>;
#[method(setLineCap:)]
pub unsafe fn setLineCap(&self, line_cap: &CAShapeLayerLineCap);
#[method_id(@__retain_semantics Other lineJoin)]
pub unsafe fn lineJoin(&self) -> Retained<CAShapeLayerLineJoin>;
#[method(setLineJoin:)]
pub unsafe fn setLineJoin(&self, line_join: &CAShapeLayerLineJoin);
#[method(lineDashPhase)]
pub unsafe fn lineDashPhase(&self) -> CGFloat;
#[method(setLineDashPhase:)]
pub unsafe fn setLineDashPhase(&self, line_dash_phase: CGFloat);
#[method_id(@__retain_semantics Other lineDashPattern)]
pub unsafe fn lineDashPattern(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setLineDashPattern:)]
pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static kCAFillRuleNonZero: &'static CAShapeLayerFillRule;
}
extern "C" {
pub static kCAFillRuleEvenOdd: &'static CAShapeLayerFillRule;
}
extern "C" {
pub static kCALineJoinMiter: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineJoinRound: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineJoinBevel: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineCapButt: &'static CAShapeLayerLineCap;
}
extern "C" {
pub static kCALineCapRound: &'static CAShapeLayerLineCap;
}
extern "C" {
pub static kCALineCapSquare: &'static CAShapeLayerLineCap;
}

View File

@@ -0,0 +1,141 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CATextLayerTruncationMode = NSString;
// NS_TYPED_ENUM
pub type CATextLayerAlignmentMode = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CATextLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CATextLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CATextLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CATextLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CATextLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CATextLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CATextLayer {
#[method_id(@__retain_semantics Other string)]
pub unsafe fn string(&self) -> Option<Retained<AnyObject>>;
#[method(setString:)]
pub unsafe fn setString(&self, string: Option<&AnyObject>);
#[method(fontSize)]
pub unsafe fn fontSize(&self) -> CGFloat;
#[method(setFontSize:)]
pub unsafe fn setFontSize(&self, font_size: CGFloat);
#[method(isWrapped)]
pub unsafe fn isWrapped(&self) -> bool;
#[method(setWrapped:)]
pub unsafe fn setWrapped(&self, wrapped: bool);
#[method_id(@__retain_semantics Other truncationMode)]
pub unsafe fn truncationMode(&self) -> Retained<CATextLayerTruncationMode>;
#[method(setTruncationMode:)]
pub unsafe fn setTruncationMode(&self, truncation_mode: &CATextLayerTruncationMode);
#[method_id(@__retain_semantics Other alignmentMode)]
pub unsafe fn alignmentMode(&self) -> Retained<CATextLayerAlignmentMode>;
#[method(setAlignmentMode:)]
pub unsafe fn setAlignmentMode(&self, alignment_mode: &CATextLayerAlignmentMode);
#[method(allowsFontSubpixelQuantization)]
pub unsafe fn allowsFontSubpixelQuantization(&self) -> bool;
#[method(setAllowsFontSubpixelQuantization:)]
pub unsafe fn setAllowsFontSubpixelQuantization(
&self,
allows_font_subpixel_quantization: bool,
);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CATextLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CATextLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static kCATruncationNone: &'static CATextLayerTruncationMode;
}
extern "C" {
pub static kCATruncationStart: &'static CATextLayerTruncationMode;
}
extern "C" {
pub static kCATruncationEnd: &'static CATextLayerTruncationMode;
}
extern "C" {
pub static kCATruncationMiddle: &'static CATextLayerTruncationMode;
}
extern "C" {
pub static kCAAlignmentNatural: &'static CATextLayerAlignmentMode;
}
extern "C" {
pub static kCAAlignmentLeft: &'static CATextLayerAlignmentMode;
}
extern "C" {
pub static kCAAlignmentRight: &'static CATextLayerAlignmentMode;
}
extern "C" {
pub static kCAAlignmentCenter: &'static CATextLayerAlignmentMode;
}
extern "C" {
pub static kCAAlignmentJustified: &'static CATextLayerAlignmentMode;
}

View File

@@ -0,0 +1,81 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CATiledLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CATiledLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CATiledLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CATiledLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CATiledLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CATiledLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CATiledLayer {
#[method(fadeDuration)]
pub unsafe fn fadeDuration() -> CFTimeInterval;
#[method(levelsOfDetail)]
pub unsafe fn levelsOfDetail(&self) -> usize;
#[method(setLevelsOfDetail:)]
pub unsafe fn setLevelsOfDetail(&self, levels_of_detail: usize);
#[method(levelsOfDetailBias)]
pub unsafe fn levelsOfDetailBias(&self) -> usize;
#[method(setLevelsOfDetailBias:)]
pub unsafe fn setLevelsOfDetailBias(&self, levels_of_detail_bias: usize);
#[method(tileSize)]
pub unsafe fn tileSize(&self) -> CGSize;
#[method(setTileSize:)]
pub unsafe fn setTileSize(&self, tile_size: CGSize);
}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CATiledLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CATiledLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,98 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CATransaction;
unsafe impl ClassType for CATransaction {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CATransaction {}
extern_methods!(
unsafe impl CATransaction {
#[method(begin)]
pub fn begin();
#[method(commit)]
pub fn commit();
#[method(flush)]
pub fn flush();
#[method(lock)]
pub unsafe fn lock();
#[method(unlock)]
pub unsafe fn unlock();
#[method(animationDuration)]
pub fn animationDuration() -> CFTimeInterval;
#[method(setAnimationDuration:)]
pub fn setAnimationDuration(dur: CFTimeInterval);
#[cfg(feature = "CAMediaTimingFunction")]
#[method_id(@__retain_semantics Other animationTimingFunction)]
pub fn animationTimingFunction() -> Option<Retained<CAMediaTimingFunction>>;
#[cfg(feature = "CAMediaTimingFunction")]
#[method(setAnimationTimingFunction:)]
pub fn setAnimationTimingFunction(function: Option<&CAMediaTimingFunction>);
#[method(disableActions)]
pub fn disableActions() -> bool;
#[method(setDisableActions:)]
pub fn setDisableActions(flag: bool);
#[cfg(feature = "block2")]
#[method(completionBlock)]
pub unsafe fn completionBlock() -> *mut block2::Block<dyn Fn()>;
#[cfg(feature = "block2")]
#[method(setCompletionBlock:)]
pub unsafe fn setCompletionBlock(block: Option<&block2::Block<dyn Fn()>>);
#[method_id(@__retain_semantics Other valueForKey:)]
pub unsafe fn valueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
#[method(setValue:forKey:)]
pub unsafe fn setValue_forKey(an_object: Option<&AnyObject>, key: &NSString);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CATransaction {
#[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 "C" {
pub static kCATransactionAnimationDuration: &'static NSString;
}
extern "C" {
pub static kCATransactionDisableActions: &'static NSString;
}
extern "C" {
pub static kCATransactionAnimationTimingFunction: &'static NSString;
}
extern "C" {
pub static kCATransactionCompletionBlock: &'static NSString;
}

View File

@@ -0,0 +1,207 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CATransform3D {
pub m11: CGFloat,
pub m12: CGFloat,
pub m13: CGFloat,
pub m14: CGFloat,
pub m21: CGFloat,
pub m22: CGFloat,
pub m23: CGFloat,
pub m24: CGFloat,
pub m31: CGFloat,
pub m32: CGFloat,
pub m33: CGFloat,
pub m34: CGFloat,
pub m41: CGFloat,
pub m42: CGFloat,
pub m43: CGFloat,
pub m44: CGFloat,
}
unsafe impl Encode for CATransform3D {
const ENCODING: Encoding = Encoding::Struct(
"CATransform3D",
&[
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
<CGFloat>::ENCODING,
],
);
}
unsafe impl RefEncode for CATransform3D {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static CATransform3DIdentity: CATransform3D;
}
#[inline]
pub extern "C" fn CATransform3DIsIdentity(t: CATransform3D) -> bool {
extern "C" {
fn CATransform3DIsIdentity(t: CATransform3D) -> bool;
}
unsafe { CATransform3DIsIdentity(t) }
}
#[inline]
pub extern "C" fn CATransform3DEqualToTransform(a: CATransform3D, b: CATransform3D) -> bool {
extern "C" {
fn CATransform3DEqualToTransform(a: CATransform3D, b: CATransform3D) -> bool;
}
unsafe { CATransform3DEqualToTransform(a, b) }
}
#[inline]
pub extern "C" fn CATransform3DMakeTranslation(
tx: CGFloat,
ty: CGFloat,
tz: CGFloat,
) -> CATransform3D {
extern "C" {
fn CATransform3DMakeTranslation(tx: CGFloat, ty: CGFloat, tz: CGFloat) -> CATransform3D;
}
unsafe { CATransform3DMakeTranslation(tx, ty, tz) }
}
#[inline]
pub extern "C" fn CATransform3DMakeScale(sx: CGFloat, sy: CGFloat, sz: CGFloat) -> CATransform3D {
extern "C" {
fn CATransform3DMakeScale(sx: CGFloat, sy: CGFloat, sz: CGFloat) -> CATransform3D;
}
unsafe { CATransform3DMakeScale(sx, sy, sz) }
}
#[inline]
pub extern "C" fn CATransform3DMakeRotation(
angle: CGFloat,
x: CGFloat,
y: CGFloat,
z: CGFloat,
) -> CATransform3D {
extern "C" {
fn CATransform3DMakeRotation(
angle: CGFloat,
x: CGFloat,
y: CGFloat,
z: CGFloat,
) -> CATransform3D;
}
unsafe { CATransform3DMakeRotation(angle, x, y, z) }
}
#[inline]
pub extern "C" fn CATransform3DTranslate(
t: CATransform3D,
tx: CGFloat,
ty: CGFloat,
tz: CGFloat,
) -> CATransform3D {
extern "C" {
fn CATransform3DTranslate(
t: CATransform3D,
tx: CGFloat,
ty: CGFloat,
tz: CGFloat,
) -> CATransform3D;
}
unsafe { CATransform3DTranslate(t, tx, ty, tz) }
}
#[inline]
pub extern "C" fn CATransform3DScale(
t: CATransform3D,
sx: CGFloat,
sy: CGFloat,
sz: CGFloat,
) -> CATransform3D {
extern "C" {
fn CATransform3DScale(
t: CATransform3D,
sx: CGFloat,
sy: CGFloat,
sz: CGFloat,
) -> CATransform3D;
}
unsafe { CATransform3DScale(t, sx, sy, sz) }
}
#[inline]
pub extern "C" fn CATransform3DRotate(
t: CATransform3D,
angle: CGFloat,
x: CGFloat,
y: CGFloat,
z: CGFloat,
) -> CATransform3D {
extern "C" {
fn CATransform3DRotate(
t: CATransform3D,
angle: CGFloat,
x: CGFloat,
y: CGFloat,
z: CGFloat,
) -> CATransform3D;
}
unsafe { CATransform3DRotate(t, angle, x, y, z) }
}
#[inline]
pub extern "C" fn CATransform3DConcat(a: CATransform3D, b: CATransform3D) -> CATransform3D {
extern "C" {
fn CATransform3DConcat(a: CATransform3D, b: CATransform3D) -> CATransform3D;
}
unsafe { CATransform3DConcat(a, b) }
}
#[inline]
pub extern "C" fn CATransform3DInvert(t: CATransform3D) -> CATransform3D {
extern "C" {
fn CATransform3DInvert(t: CATransform3D) -> CATransform3D;
}
unsafe { CATransform3DInvert(t) }
}
#[inline]
pub extern "C" fn CATransform3DIsAffine(t: CATransform3D) -> bool {
extern "C" {
fn CATransform3DIsAffine(t: CATransform3D) -> bool;
}
unsafe { CATransform3DIsAffine(t) }
}
extern_category!(
/// Category "CATransform3DAdditions" on [`NSValue`].
#[doc(alias = "CATransform3DAdditions")]
pub unsafe trait NSValueCATransform3DAdditions {
#[method_id(@__retain_semantics Other valueWithCATransform3D:)]
unsafe fn valueWithCATransform3D(t: CATransform3D) -> Retained<NSValue>;
#[method(CATransform3DValue)]
unsafe fn CATransform3DValue(&self) -> CATransform3D;
}
unsafe impl NSValueCATransform3DAdditions for NSValue {}
);

View File

@@ -0,0 +1,60 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CATransformLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CATransformLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CATransformLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CATransformLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CATransformLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CATransformLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CATransformLayer {}
);
extern_methods!(
/// Methods declared on superclass `CALayer`
#[cfg(feature = "CALayer")]
unsafe impl CATransformLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CALayer")]
unsafe impl CATransformLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,90 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_ENUM
pub type CAValueFunctionName = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CAValueFunction;
unsafe impl ClassType for CAValueFunction {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CAValueFunction {}
unsafe impl NSObjectProtocol for CAValueFunction {}
unsafe impl NSSecureCoding for CAValueFunction {}
extern_methods!(
unsafe impl CAValueFunction {
#[method_id(@__retain_semantics Other functionWithName:)]
pub unsafe fn functionWithName(name: &CAValueFunctionName) -> Option<Retained<Self>>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<CAValueFunctionName>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CAValueFunction {
#[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 "C" {
pub static kCAValueFunctionRotateX: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionRotateY: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionRotateZ: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionScale: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionScaleX: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionScaleY: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionScaleZ: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionTranslate: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionTranslateX: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionTranslateY: &'static CAValueFunctionName;
}
extern "C" {
pub static kCAValueFunctionTranslateZ: &'static CAValueFunctionName;
}

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,477 @@
// This file has been automatically generated by `objc2`'s `header-translator`.
// DO NOT EDIT
#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#[link(name = "QuartzCore", kind = "framework")]
extern "C" {}
#[cfg(feature = "CAAnimation")]
#[path = "CAAnimation.rs"]
mod __CAAnimation;
#[cfg(feature = "CABase")]
#[path = "CABase.rs"]
mod __CABase;
#[cfg(feature = "CAConstraintLayoutManager")]
#[path = "CAConstraintLayoutManager.rs"]
mod __CAConstraintLayoutManager;
#[cfg(feature = "CADisplayLink")]
#[path = "CADisplayLink.rs"]
mod __CADisplayLink;
#[cfg(feature = "CAEDRMetadata")]
#[path = "CAEDRMetadata.rs"]
mod __CAEDRMetadata;
#[cfg(feature = "CAEmitterCell")]
#[path = "CAEmitterCell.rs"]
mod __CAEmitterCell;
#[cfg(feature = "CAEmitterLayer")]
#[path = "CAEmitterLayer.rs"]
mod __CAEmitterLayer;
#[cfg(feature = "CAFrameRateRange")]
#[path = "CAFrameRateRange.rs"]
mod __CAFrameRateRange;
#[cfg(feature = "CAGradientLayer")]
#[path = "CAGradientLayer.rs"]
mod __CAGradientLayer;
#[cfg(feature = "CALayer")]
#[path = "CALayer.rs"]
mod __CALayer;
#[cfg(feature = "CAMediaTiming")]
#[path = "CAMediaTiming.rs"]
mod __CAMediaTiming;
#[cfg(feature = "CAMediaTimingFunction")]
#[path = "CAMediaTimingFunction.rs"]
mod __CAMediaTimingFunction;
#[cfg(feature = "CAMetalDisplayLink")]
#[path = "CAMetalDisplayLink.rs"]
mod __CAMetalDisplayLink;
#[cfg(feature = "CAMetalLayer")]
#[path = "CAMetalLayer.rs"]
mod __CAMetalLayer;
#[cfg(feature = "CAOpenGLLayer")]
#[path = "CAOpenGLLayer.rs"]
mod __CAOpenGLLayer;
#[cfg(feature = "CARemoteLayerClient")]
#[path = "CARemoteLayerClient.rs"]
mod __CARemoteLayerClient;
#[cfg(feature = "CARemoteLayerServer")]
#[path = "CARemoteLayerServer.rs"]
mod __CARemoteLayerServer;
#[cfg(feature = "CARenderer")]
#[path = "CARenderer.rs"]
mod __CARenderer;
#[cfg(feature = "CAReplicatorLayer")]
#[path = "CAReplicatorLayer.rs"]
mod __CAReplicatorLayer;
#[cfg(feature = "CAScrollLayer")]
#[path = "CAScrollLayer.rs"]
mod __CAScrollLayer;
#[cfg(feature = "CAShapeLayer")]
#[path = "CAShapeLayer.rs"]
mod __CAShapeLayer;
#[cfg(feature = "CATextLayer")]
#[path = "CATextLayer.rs"]
mod __CATextLayer;
#[cfg(feature = "CATiledLayer")]
#[path = "CATiledLayer.rs"]
mod __CATiledLayer;
#[cfg(feature = "CATransaction")]
#[path = "CATransaction.rs"]
mod __CATransaction;
#[cfg(feature = "CATransform3D")]
#[path = "CATransform3D.rs"]
mod __CATransform3D;
#[cfg(feature = "CATransformLayer")]
#[path = "CATransformLayer.rs"]
mod __CATransformLayer;
#[cfg(feature = "CAValueFunction")]
#[path = "CAValueFunction.rs"]
mod __CAValueFunction;
#[cfg(feature = "CoreAnimation")]
#[path = "CoreAnimation.rs"]
mod __CoreAnimation;
#[cfg(feature = "CoreImage")]
#[path = "CoreImage.rs"]
mod __CoreImage;
#[cfg(feature = "CoreVideo")]
#[path = "CoreVideo.rs"]
mod __CoreVideo;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationCubic;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationCubicPaced;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationDiscrete;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationLinear;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationPaced;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationRotateAuto;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCAAnimationRotateAutoReverse;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionFade;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionFromBottom;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionFromLeft;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionFromRight;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionFromTop;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionMoveIn;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionPush;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::kCATransitionReveal;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAAnimation;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAAnimationCalculationMode;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAAnimationDelegate;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAAnimationGroup;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAAnimationRotationMode;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CABasicAnimation;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAKeyframeAnimation;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CAPropertyAnimation;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CASpringAnimation;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CATransition;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CATransitionSubtype;
#[cfg(feature = "CAAnimation")]
pub use self::__CAAnimation::CATransitionType;
#[cfg(feature = "CABase")]
pub use self::__CABase::CACurrentMediaTime;
#[cfg(feature = "CAConstraintLayoutManager")]
pub use self::__CAConstraintLayoutManager::CAConstraint;
#[cfg(feature = "CAConstraintLayoutManager")]
pub use self::__CAConstraintLayoutManager::CAConstraintAttribute;
#[cfg(feature = "CAConstraintLayoutManager")]
pub use self::__CAConstraintLayoutManager::CAConstraintLayoutManager;
#[cfg(feature = "CADisplayLink")]
pub use self::__CADisplayLink::CADisplayLink;
#[cfg(feature = "CAEDRMetadata")]
pub use self::__CAEDRMetadata::CAEDRMetadata;
#[cfg(feature = "CAEmitterCell")]
pub use self::__CAEmitterCell::CAEmitterCell;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerAdditive;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerBackToFront;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerCircle;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerCuboid;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerLine;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerOldestFirst;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerOldestLast;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerOutline;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerPoint;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerPoints;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerRectangle;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerSphere;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerSurface;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerUnordered;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::kCAEmitterLayerVolume;
#[cfg(all(feature = "CAEmitterLayer", feature = "CALayer"))]
pub use self::__CAEmitterLayer::CAEmitterLayer;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::CAEmitterLayerEmitterMode;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::CAEmitterLayerEmitterShape;
#[cfg(feature = "CAEmitterLayer")]
pub use self::__CAEmitterLayer::CAEmitterLayerRenderMode;
#[cfg(feature = "CAFrameRateRange")]
pub use self::__CAFrameRateRange::CAFrameRateRange;
#[cfg(feature = "CAFrameRateRange")]
pub use self::__CAFrameRateRange::CAFrameRateRangeDefault;
#[cfg(feature = "CAFrameRateRange")]
pub use self::__CAFrameRateRange::CAFrameRateRangeIsEqualToRange;
#[cfg(feature = "CAFrameRateRange")]
pub use self::__CAFrameRateRange::CAFrameRateRangeMake;
#[cfg(feature = "CAGradientLayer")]
pub use self::__CAGradientLayer::kCAGradientLayerAxial;
#[cfg(feature = "CAGradientLayer")]
pub use self::__CAGradientLayer::kCAGradientLayerConic;
#[cfg(feature = "CAGradientLayer")]
pub use self::__CAGradientLayer::kCAGradientLayerRadial;
#[cfg(all(feature = "CAGradientLayer", feature = "CALayer"))]
pub use self::__CAGradientLayer::CAGradientLayer;
#[cfg(feature = "CAGradientLayer")]
pub use self::__CAGradientLayer::CAGradientLayerType;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAContentsFormatGray8Uint;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAContentsFormatRGBA16Float;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAContentsFormatRGBA8Uint;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCACornerCurveCircular;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCACornerCurveContinuous;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAFilterLinear;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAFilterNearest;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAFilterTrilinear;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityBottom;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityBottomLeft;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityBottomRight;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityCenter;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityLeft;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityResize;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityResizeAspect;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityResizeAspectFill;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityRight;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityTop;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityTopLeft;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAGravityTopRight;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAOnOrderIn;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCAOnOrderOut;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::kCATransition;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CAAction;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CAAutoresizingMask;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CACornerMask;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CAEdgeAntialiasingMask;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayer;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayerContentsFilter;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayerContentsFormat;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayerContentsGravity;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayerCornerCurve;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayerDelegate;
#[cfg(feature = "CALayer")]
pub use self::__CALayer::CALayoutManager;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::kCAFillModeBackwards;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::kCAFillModeBoth;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::kCAFillModeForwards;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::kCAFillModeRemoved;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::CAMediaTiming;
#[cfg(feature = "CAMediaTiming")]
pub use self::__CAMediaTiming::CAMediaTimingFillMode;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::kCAMediaTimingFunctionDefault;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::kCAMediaTimingFunctionEaseIn;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::kCAMediaTimingFunctionEaseInEaseOut;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::kCAMediaTimingFunctionEaseOut;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::kCAMediaTimingFunctionLinear;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::CAMediaTimingFunction;
#[cfg(feature = "CAMediaTimingFunction")]
pub use self::__CAMediaTimingFunction::CAMediaTimingFunctionName;
#[cfg(feature = "CAMetalDisplayLink")]
pub use self::__CAMetalDisplayLink::CAMetalDisplayLink;
#[cfg(feature = "CAMetalDisplayLink")]
pub use self::__CAMetalDisplayLink::CAMetalDisplayLinkDelegate;
#[cfg(feature = "CAMetalDisplayLink")]
pub use self::__CAMetalDisplayLink::CAMetalDisplayLinkUpdate;
#[cfg(all(feature = "CAMetalLayer", feature = "objc2-metal"))]
pub use self::__CAMetalLayer::CAMetalDrawable;
#[cfg(all(feature = "CALayer", feature = "CAMetalLayer"))]
pub use self::__CAMetalLayer::CAMetalLayer;
#[cfg(feature = "CARemoteLayerClient")]
pub use self::__CARemoteLayerClient::CARemoteLayerClient;
#[cfg(feature = "CARemoteLayerServer")]
pub use self::__CARemoteLayerServer::CARemoteLayerServer;
#[cfg(feature = "CARenderer")]
pub use self::__CARenderer::kCARendererColorSpace;
#[cfg(feature = "CARenderer")]
pub use self::__CARenderer::kCARendererMetalCommandQueue;
#[cfg(feature = "CARenderer")]
pub use self::__CARenderer::CARenderer;
#[cfg(all(feature = "CALayer", feature = "CAReplicatorLayer"))]
pub use self::__CAReplicatorLayer::CAReplicatorLayer;
#[cfg(feature = "CAScrollLayer")]
pub use self::__CAScrollLayer::kCAScrollBoth;
#[cfg(feature = "CAScrollLayer")]
pub use self::__CAScrollLayer::kCAScrollHorizontally;
#[cfg(feature = "CAScrollLayer")]
pub use self::__CAScrollLayer::kCAScrollNone;
#[cfg(feature = "CAScrollLayer")]
pub use self::__CAScrollLayer::kCAScrollVertically;
#[cfg(all(feature = "CALayer", feature = "CAScrollLayer"))]
pub use self::__CAScrollLayer::CAScrollLayer;
#[cfg(feature = "CAScrollLayer")]
pub use self::__CAScrollLayer::CAScrollLayerScrollMode;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCAFillRuleEvenOdd;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCAFillRuleNonZero;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineCapButt;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineCapRound;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineCapSquare;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineJoinBevel;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineJoinMiter;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::kCALineJoinRound;
#[cfg(all(feature = "CALayer", feature = "CAShapeLayer"))]
pub use self::__CAShapeLayer::CAShapeLayer;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::CAShapeLayerFillRule;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::CAShapeLayerLineCap;
#[cfg(feature = "CAShapeLayer")]
pub use self::__CAShapeLayer::CAShapeLayerLineJoin;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCAAlignmentCenter;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCAAlignmentJustified;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCAAlignmentLeft;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCAAlignmentNatural;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCAAlignmentRight;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCATruncationEnd;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCATruncationMiddle;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCATruncationNone;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::kCATruncationStart;
#[cfg(all(feature = "CALayer", feature = "CATextLayer"))]
pub use self::__CATextLayer::CATextLayer;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::CATextLayerAlignmentMode;
#[cfg(feature = "CATextLayer")]
pub use self::__CATextLayer::CATextLayerTruncationMode;
#[cfg(all(feature = "CALayer", feature = "CATiledLayer"))]
pub use self::__CATiledLayer::CATiledLayer;
#[cfg(feature = "CATransaction")]
pub use self::__CATransaction::kCATransactionAnimationDuration;
#[cfg(feature = "CATransaction")]
pub use self::__CATransaction::kCATransactionAnimationTimingFunction;
#[cfg(feature = "CATransaction")]
pub use self::__CATransaction::kCATransactionCompletionBlock;
#[cfg(feature = "CATransaction")]
pub use self::__CATransaction::kCATransactionDisableActions;
#[cfg(feature = "CATransaction")]
pub use self::__CATransaction::CATransaction;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3D;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DConcat;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DEqualToTransform;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DIdentity;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DInvert;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DIsAffine;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DIsIdentity;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DMakeRotation;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DMakeScale;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DMakeTranslation;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DRotate;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DScale;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::CATransform3DTranslate;
#[cfg(feature = "CATransform3D")]
pub use self::__CATransform3D::NSValueCATransform3DAdditions;
#[cfg(all(feature = "CALayer", feature = "CATransformLayer"))]
pub use self::__CATransformLayer::CATransformLayer;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionRotateX;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionRotateY;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionRotateZ;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionScale;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionScaleX;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionScaleY;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionScaleZ;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionTranslate;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionTranslateX;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionTranslateY;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::kCAValueFunctionTranslateZ;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::CAValueFunction;
#[cfg(feature = "CAValueFunction")]
pub use self::__CAValueFunction::CAValueFunctionName;

28
vendor/objc2-quartz-core/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,28 @@
//! # Bindings to the `CoreAnimation` framework
//!
//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
//!
//! [apple-doc]: https://developer.apple.com/documentation/quartzcore/
//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
//!
//! This actually lives in the `QuartzCore` framework, but `CoreAnimation` is
//! the name that people use to refer to it.
#![recursion_limit = "256"]
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2-quartz-core/0.2.2")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;
// CoreFoundation
#[allow(dead_code)]
pub(crate) type CFTimeInterval = std::os::raw::c_double;

View File

@@ -0,0 +1,269 @@
framework = "QuartzCore"
crate = "objc2-quartz-core"
umbrella-header = "CoreAnimation.h"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "10.3"
maccatalyst = "13.0"
ios = "2.0"
tvos = "9.0"
visionos = "1.0"
# Uses stuff from CoreFoundation and CoreGraphics
class.CAKeyframeAnimation.methods.path.skipped = true
class.CAKeyframeAnimation.methods."setPath:".skipped = true
class.CAShapeLayer.methods.path.skipped = true
class.CAShapeLayer.methods."setPath:".skipped = true
class.CAShapeLayer.methods.fillColor.skipped = true
class.CAShapeLayer.methods."setFillColor:".skipped = true
class.CAShapeLayer.methods.strokeColor.skipped = true
class.CAShapeLayer.methods."setStrokeColor:".skipped = true
class.CAEmitterCell.methods.color.skipped = true
class.CAEmitterCell.methods."setColor:".skipped = true
class.CALayer.methods.affineTransform.skipped = true
class.CALayer.methods."setAffineTransform:".skipped = true
class.CALayer.methods."drawInContext:".skipped = true
class.CALayer.methods."renderInContext:".skipped = true
class.CALayer.methods.backgroundColor.skipped = true
class.CALayer.methods."setBackgroundColor:".skipped = true
class.CALayer.methods.borderColor.skipped = true
class.CALayer.methods."setBorderColor:".skipped = true
class.CALayer.methods.shadowColor.skipped = true
class.CALayer.methods."setShadowColor:".skipped = true
class.CALayer.methods.shadowPath.skipped = true
class.CALayer.methods."setShadowPath:".skipped = true
protocol.CALayerDelegate.methods."drawLayer:inContext:".skipped = true
# Needs `CGColorSpaceRef`
class.CAMetalLayer.methods.colorspace.skipped = true
class.CAMetalLayer.methods."setColorspace:".skipped = true
class.CAOpenGLLayer.skipped = true
class.CARenderer.methods."rendererWithMTLTexture:options:".skipped = true
class.CARenderer.methods."setDestination:".skipped = true
class.CARenderer.methods."beginFrameAtTime:timeStamp:".skipped = true
class.CARemoteLayerClient.methods."initWithServerPort:".skipped = true
class.CARemoteLayerServer.methods.serverPort.skipped = true
class.CAReplicatorLayer.methods.instanceColor.skipped = true
class.CAReplicatorLayer.methods."setInstanceColor:".skipped = true
class.CATextLayer.methods.font.skipped = true
class.CATextLayer.methods."setFont:".skipped = true
class.CATextLayer.methods.foregroundColor.skipped = true
class.CATextLayer.methods."setForegroundColor:".skipped = true
fn.CATransform3DMakeAffineTransform.skipped = true
fn.CATransform3DGetAffineTransform.skipped = true
# I'm unsure of the ABI of the array this takes
class.CAMediaTimingFunction.methods."getControlPointAtIndex:values:".skipped = true
# Needs `EAGLDrawable` from `OpenGLES`
class.CAEAGLLayer.skipped-protocols = ["EAGLDrawable"]
###
### Safety
###
# We probably technically had the choice of making these classes mutating
# methods require `&mut`, but as with so many things in Cocoa, that would
# make it difficult to use in a larger context (e.g. even after assigning a
# layer to a view you'd often still want to modify the layer).
fn.CACurrentMediaTime.unsafe = false
# SAFETY: Basic mathematical functions
fn.CATransform3DIsIdentity.unsafe = false
fn.CATransform3DEqualToTransform.unsafe = false
fn.CATransform3DMakeTranslation.unsafe = false
fn.CATransform3DMakeScale.unsafe = false
fn.CATransform3DMakeRotation.unsafe = false
fn.CATransform3DTranslate.unsafe = false
fn.CATransform3DScale.unsafe = false
fn.CATransform3DRotate.unsafe = false
fn.CATransform3DConcat.unsafe = false
fn.CATransform3DInvert.unsafe = false
fn.CATransform3DMakeAffineTransform.unsafe = false
fn.CATransform3DIsAffine.unsafe = false
fn.CATransform3DGetAffineTransform.unsafe = false
class.CALayer.methods.layer.unsafe = false
class.CALayer.methods.init.unsafe = false
class.CALayer.methods.initWithLayer.unsafe = true # must be called in a specific context
class.CALayer.methods.presentationLayer.unsafe = true # return value may not be safe to modify
class.CALayer.methods.modelLayer.unsafe = true # must be called in a specific context
class.CALayer.methods.new.unsafe = false
class.CALayer.methods.bounds.unsafe = false
class.CALayer.methods."setBounds:".unsafe = false
class.CALayer.methods.position.unsafe = false
class.CALayer.methods."setPosition:".unsafe = false
class.CALayer.methods.zPosition.unsafe = false
class.CALayer.methods."setZPosition:".unsafe = false
class.CALayer.methods.anchorPoint.unsafe = false
class.CALayer.methods."setAnchorPoint:".unsafe = false
class.CALayer.methods.anchorPointZ.unsafe = false
class.CALayer.methods."setAnchorPointZ:".unsafe = false
class.CALayer.methods.transform.unsafe = false
class.CALayer.methods."setTransform:".unsafe = false
class.CALayer.methods.affineTransform.unsafe = false
class.CALayer.methods."setAffineTransform:".unsafe = false
class.CALayer.methods.frame.unsafe = false
class.CALayer.methods."setFrame:".unsafe = false
class.CALayer.methods.isHidden.unsafe = false
class.CALayer.methods."setHidden:".unsafe = false
class.CALayer.methods.isDoubleSided.unsafe = false
class.CALayer.methods."setDoubleSided:".unsafe = false
class.CALayer.methods.isGeometryFlipped.unsafe = false
class.CALayer.methods."setGeometryFlipped:".unsafe = false
class.CALayer.methods.contentsAreFlipped.unsafe = false
class.CALayer.methods.superlayer.unsafe = false
class.CALayer.methods.removeFromSuperlayer.unsafe = false
class.CALayer.methods.sublayers.unsafe = true # The returned array is not guaranteed to retain its elements
class.CALayer.methods."setSublayers:".unsafe = true # Requires all layers to have a `nil` superlayer
# If the layer already has a superlayer, it will be changed
# appropriately by these methods (`removeFromSuperlayer` is called on
# the given layer inside these).
class.CALayer.methods."addSublayer:".unsafe = false
class.CALayer.methods."insertSublayer:atIndex:".unsafe = false
class.CALayer.methods."insertSublayer:below:".unsafe = false
class.CALayer.methods."insertSublayer:above:".unsafe = false
class.CALayer.methods."replaceSublayer:".unsafe = true # Requires `oldlayer` to exist in the current layer
class.CALayer.methods.sublayerTransform.unsafe = false
class.CALayer.methods."setSublayerTransform:".unsafe = false
class.CALayer.methods.mask.unsafe = false
class.CALayer.methods."setMask:".unsafe = true # Argument must have a `nil` superlayer
class.CALayer.methods.masksToBounds.unsafe = false
class.CALayer.methods."setMasksToBounds:".unsafe = false
class.CALayer.methods."convertPoint:fromLayer:".unsafe = false
class.CALayer.methods."convertPoint:toLayer:".unsafe = false
class.CALayer.methods."convertRect:fromLayer:".unsafe = false
class.CALayer.methods."convertRect:toLayer:".unsafe = false
class.CALayer.methods."convertTime:fromLayer:".unsafe = false
class.CALayer.methods."convertTime:toLayer:".unsafe = false
class.CALayer.methods."hitTest:".unsafe = false
class.CALayer.methods."containsPoint:".unsafe = false
class.CALayer.methods.contents.unsafe = true # No type set
class.CALayer.methods."setContents:".unsafe = true # No type set
class.CALayer.methods.contentsRect.unsafe = false
class.CALayer.methods."setContentsRect:".unsafe = false
class.CALayer.methods.contentsGravity.unsafe = false
class.CALayer.methods."setContentsGravity:".unsafe = false
class.CALayer.methods.contentsScale.unsafe = false
class.CALayer.methods."setContentsScale:".unsafe = false
class.CALayer.methods.contentsCenter.unsafe = false
class.CALayer.methods."setContentsCenter:".unsafe = false
class.CALayer.methods.contentsFormat.unsafe = false
class.CALayer.methods."setContentsFormat:".unsafe = false
class.CALayer.methods.minificationFilter.unsafe = false
class.CALayer.methods."setMinificationFilter:".unsafe = false
class.CALayer.methods.magnificationFilter.unsafe = false
class.CALayer.methods."setMagnificationFilter:".unsafe = false
class.CALayer.methods.minificationFilterBias.unsafe = false
class.CALayer.methods."setMinificationFilterBias:".unsafe = false
class.CALayer.methods.isOpaque.unsafe = false
class.CALayer.methods."setOpaque:".unsafe = false
class.CALayer.methods.display.unsafe = false
class.CALayer.methods.setNeedsDisplay.unsafe = false
class.CALayer.methods."setNeedsDisplayInRect:".unsafe = false
class.CALayer.methods.needsDisplay.unsafe = false
class.CALayer.methods.displayIfNeeded.unsafe = false
class.CALayer.methods.needsDisplayOnBoundsChange.unsafe = false
class.CALayer.methods."setNeedsDisplayOnBoundsChange:".unsafe = false
class.CALayer.methods.drawsAsynchronously.unsafe = false
class.CALayer.methods."setDrawsAsynchronously:".unsafe = false
class.CALayer.methods.edgeAntialiasingMask.unsafe = false
class.CALayer.methods."setEdgeAntialiasingMask:".unsafe = false
class.CALayer.methods.allowsEdgeAntialiasing.unsafe = false
class.CALayer.methods."setAllowsEdgeAntialiasing:".unsafe = false
class.CALayer.methods.cornerRadius.unsafe = false
class.CALayer.methods."setCornerRadius:".unsafe = false
class.CALayer.methods.maskedCorners.unsafe = false
class.CALayer.methods."setMaskedCorners:".unsafe = false
class.CALayer.methods.cornerCurve.unsafe = false
class.CALayer.methods."setCornerCurve:".unsafe = false
class.CALayer.methods."cornerCurveExpansionFactor:".unsafe = false
class.CALayer.methods.borderWidth.unsafe = false
class.CALayer.methods."setBorderWidth:".unsafe = false
class.CALayer.methods.opacity.unsafe = false
# Gives "undefined results" outside [0; 1], but by this the authors
# very likely didn't mean "triggers language-level UB".
class.CALayer.methods."setOpacity:".unsafe = false
class.CALayer.methods.allowsGroupOpacity.unsafe = false
class.CALayer.methods."setAllowsGroupOpacity:".unsafe = false
# No type set:
# compositingFilter
# setCompositingFilter:
# filters
# setFilters:
# backgroundFilters
# setBackgroundFilters:
class.CALayer.methods.shouldRasterize.unsafe = false
class.CALayer.methods."setShouldRasterize:".unsafe = false
class.CALayer.methods.rasterizationScale.unsafe = false
class.CALayer.methods."setRasterizationScale:".unsafe = false
class.CALayer.methods.shadowOpacity.unsafe = false
# Gives "undefined results" outside [0; 1], but by this the authors
# very likely didn't mean "triggers language-level UB".
class.CALayer.methods."setShadowOpacity:".unsafe = false
class.CALayer.methods.shadowOffset.unsafe = false
class.CALayer.methods."setShadowOffset:".unsafe = false
class.CALayer.methods.shadowRadius.unsafe = false
class.CALayer.methods."setShadowRadius:".unsafe = false
class.CALayer.methods.autoresizingMask.unsafe = false
class.CALayer.methods."setAutoresizingMask:".unsafe = false
class.CALayer.methods.layoutManager.unsafe = false
class.CALayer.methods."setLayoutManager:".unsafe = false
class.CALayer.methods.preferredFrameSize.unsafe = false
class.CALayer.methods.setNeedsLayout.unsafe = false
class.CALayer.methods.needsLayout.unsafe = false
class.CALayer.methods.layoutIfNeeded.unsafe = false
class.CALayer.methods.layoutSublayers.unsafe = false
class.CALayer.methods."resizeSublayersWithOldSize:".unsafe = false
class.CALayer.methods."resizeWithOldSuperlayerSize:".unsafe = false
class.CALayer.methods."defaultActionForKey:".unsafe = false
class.CALayer.methods."actionForKey:".unsafe = false
class.CALayer.methods.actions.unsafe = false
class.CALayer.methods."setActions:".unsafe = false
class.CALayer.methods."addAnimation:forKey:".unsafe = false # Copies the animation
class.CALayer.methods.removeAllAnimations.unsafe = false
class.CALayer.methods."removeAnimationForKey:".unsafe = false
class.CALayer.methods.animationKeys.unsafe = false
class.CALayer.methods.animationForKey.unsafe = true # Modifying the returned animation is UB
class.CALayer.methods.name.unsafe = false
class.CALayer.methods."setName:".unsafe = false
class.CALayer.methods.delegate.unsafe = false
class.CALayer.methods."setDelegate:".unsafe = false
# No type set:
# style
# setStyle:
class.CARenderer.methods.layer.unsafe = false
class.CARenderer.methods."setLayer:".unsafe = false
class.CARenderer.methods.bounds.unsafe = false
class.CARenderer.methods."setBounds:".unsafe = false
class.CARenderer.methods.updateBounds.unsafe = false
class.CARenderer.methods."addUpdateRect:".unsafe = false
class.CARenderer.methods.render.unsafe = false
class.CARenderer.methods.nextFrameTime.unsafe = false
class.CARenderer.methods.endFrame.unsafe = false
# SAFETY: CATransaction methods access thread-local state.
class.CATransaction.methods.begin.unsafe = false
class.CATransaction.methods.commit.unsafe = false
class.CATransaction.methods.flush.unsafe = false
class.CATransaction.methods.animationDuration.unsafe = false
class.CATransaction.methods."setAnimationDuration:".unsafe = false
class.CATransaction.methods.animationTimingFunction.unsafe = false
class.CATransaction.methods."setAnimationTimingFunction:".unsafe = false
class.CATransaction.methods.disableActions.unsafe = false
class.CATransaction.methods."setDisableActions:".unsafe = false
# TODO: completionBlock and setCompletionBlock: