objc2_app_kit/generated/
NSAnimationContext.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-quartz-core")]
8#[cfg(target_vendor = "apple")]
9use objc2_quartz_core::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct NSAnimationContext;
18);
19
20unsafe impl NSObjectProtocol for NSAnimationContext {}
21
22impl NSAnimationContext {
23 extern_methods!(
24 #[cfg(feature = "block2")]
25 #[unsafe(method(runAnimationGroup:completionHandler:))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn runAnimationGroup_completionHandler(
28 changes: &block2::Block<dyn Fn(NonNull<NSAnimationContext>) + '_>,
29 completion_handler: Option<&block2::Block<dyn Fn()>>,
30 );
31
32 #[cfg(feature = "block2")]
33 #[unsafe(method(runAnimationGroup:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn runAnimationGroup(
36 changes: &block2::Block<dyn Fn(NonNull<NSAnimationContext>) + '_>,
37 );
38
39 #[unsafe(method(beginGrouping))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn beginGrouping();
42
43 #[unsafe(method(endGrouping))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn endGrouping();
46
47 #[unsafe(method(currentContext))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn currentContext() -> Retained<NSAnimationContext>;
50
51 #[unsafe(method(duration))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn duration(&self) -> NSTimeInterval;
54
55 #[unsafe(method(setDuration:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn setDuration(&self, duration: NSTimeInterval);
59
60 #[cfg(feature = "objc2-quartz-core")]
61 #[cfg(target_vendor = "apple")]
62 #[unsafe(method(timingFunction))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn timingFunction(&self) -> Option<Retained<CAMediaTimingFunction>>;
65
66 #[cfg(feature = "objc2-quartz-core")]
67 #[cfg(target_vendor = "apple")]
68 #[unsafe(method(setTimingFunction:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setTimingFunction(&self, timing_function: Option<&CAMediaTimingFunction>);
72
73 #[cfg(feature = "block2")]
74 #[unsafe(method(completionHandler))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn completionHandler(&self) -> *mut block2::Block<dyn Fn()>;
77
78 #[cfg(feature = "block2")]
79 #[unsafe(method(setCompletionHandler:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setCompletionHandler(
83 &self,
84 completion_handler: Option<&block2::Block<dyn Fn()>>,
85 );
86
87 #[unsafe(method(allowsImplicitAnimation))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn allowsImplicitAnimation(&self) -> bool;
90
91 #[unsafe(method(setAllowsImplicitAnimation:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn setAllowsImplicitAnimation(&self, allows_implicit_animation: bool);
95 );
96}
97
98impl NSAnimationContext {
100 extern_methods!(
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
104
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108 );
109}