objc2_intents/generated/
INPlayMediaPlaybackSpeedResolutionResult.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INPlayMediaPlaybackSpeedUnsupportedReason(pub NSInteger);
15impl INPlayMediaPlaybackSpeedUnsupportedReason {
16 #[doc(alias = "INPlayMediaPlaybackSpeedUnsupportedReasonBelowMinimum")]
17 pub const BelowMinimum: Self = Self(1);
18 #[doc(alias = "INPlayMediaPlaybackSpeedUnsupportedReasonAboveMaximum")]
19 pub const AboveMaximum: Self = Self(2);
20}
21
22unsafe impl Encode for INPlayMediaPlaybackSpeedUnsupportedReason {
23 const ENCODING: Encoding = NSInteger::ENCODING;
24}
25
26unsafe impl RefEncode for INPlayMediaPlaybackSpeedUnsupportedReason {
27 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
28}
29
30extern_class!(
31 #[unsafe(super(INDoubleResolutionResult, INIntentResolutionResult, NSObject))]
33 #[derive(Debug, PartialEq, Eq, Hash)]
34 #[cfg(all(
35 feature = "INDoubleResolutionResult",
36 feature = "INIntentResolutionResult"
37 ))]
38 pub struct INPlayMediaPlaybackSpeedResolutionResult;
39);
40
41#[cfg(all(
42 feature = "INDoubleResolutionResult",
43 feature = "INIntentResolutionResult"
44))]
45extern_conformance!(
46 unsafe impl NSObjectProtocol for INPlayMediaPlaybackSpeedResolutionResult {}
47);
48
49#[cfg(all(
50 feature = "INDoubleResolutionResult",
51 feature = "INIntentResolutionResult"
52))]
53impl INPlayMediaPlaybackSpeedResolutionResult {
54 extern_methods!(
55 #[unsafe(method(unsupportedForReason:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn unsupportedForReason(
58 reason: INPlayMediaPlaybackSpeedUnsupportedReason,
59 ) -> Retained<Self>;
60
61 #[unsafe(method(initWithDoubleResolutionResult:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithDoubleResolutionResult(
64 this: Allocated<Self>,
65 double_resolution_result: &INDoubleResolutionResult,
66 ) -> Retained<Self>;
67 );
68}
69
70#[cfg(all(
72 feature = "INDoubleResolutionResult",
73 feature = "INIntentResolutionResult"
74))]
75impl INPlayMediaPlaybackSpeedResolutionResult {
76 extern_methods!(
77 #[unsafe(method(successWithResolvedValue:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn successWithResolvedValue(resolved_value: c_double) -> Retained<Self>;
80
81 #[unsafe(method(confirmationRequiredWithValueToConfirm:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn confirmationRequiredWithValueToConfirm(
84 value_to_confirm: Option<&NSNumber>,
85 ) -> Retained<Self>;
86 );
87}
88
89#[cfg(all(
91 feature = "INDoubleResolutionResult",
92 feature = "INIntentResolutionResult"
93))]
94impl INPlayMediaPlaybackSpeedResolutionResult {
95 extern_methods!(
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(needsValue))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn needsValue() -> Retained<Self>;
103
104 #[unsafe(method(notRequired))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn notRequired() -> Retained<Self>;
107
108 #[unsafe(method(unsupported))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn unsupported() -> Retained<Self>;
111 );
112}
113
114#[cfg(all(
116 feature = "INDoubleResolutionResult",
117 feature = "INIntentResolutionResult"
118))]
119impl INPlayMediaPlaybackSpeedResolutionResult {
120 extern_methods!(
121 #[unsafe(method(new))]
122 #[unsafe(method_family = new)]
123 pub unsafe fn new() -> Retained<Self>;
124 );
125}