objc2_metal/generated/
MTL4CompilerTask.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct MTL4CompilerTaskStatus(pub NSInteger);
16impl MTL4CompilerTaskStatus {
17 #[doc(alias = "MTL4CompilerTaskStatusNone")]
19 pub const None: Self = Self(0);
20 #[doc(alias = "MTL4CompilerTaskStatusScheduled")]
22 pub const Scheduled: Self = Self(1);
23 #[doc(alias = "MTL4CompilerTaskStatusCompiling")]
25 pub const Compiling: Self = Self(2);
26 #[doc(alias = "MTL4CompilerTaskStatusFinished")]
28 pub const Finished: Self = Self(3);
29}
30
31unsafe impl Encode for MTL4CompilerTaskStatus {
32 const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for MTL4CompilerTaskStatus {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_protocol!(
40 pub unsafe trait MTL4CompilerTask: NSObjectProtocol {
44 #[cfg(feature = "MTL4Compiler")]
45 #[unsafe(method(compiler))]
47 #[unsafe(method_family = none)]
48 fn compiler(&self) -> Retained<ProtocolObject<dyn MTL4Compiler>>;
49
50 #[unsafe(method(status))]
54 #[unsafe(method_family = none)]
55 fn status(&self) -> MTL4CompilerTaskStatus;
56
57 #[unsafe(method(waitUntilCompleted))]
59 #[unsafe(method_family = none)]
60 fn waitUntilCompleted(&self);
61 }
62);