objc2_foundation/generated/
NSScriptExecutionContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsscriptexecutioncontext?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct NSScriptExecutionContext;
14);
15
16unsafe impl NSObjectProtocol for NSScriptExecutionContext {}
17
18impl NSScriptExecutionContext {
19    extern_methods!(
20        #[unsafe(method(sharedScriptExecutionContext))]
21        #[unsafe(method_family = none)]
22        pub unsafe fn sharedScriptExecutionContext() -> Retained<NSScriptExecutionContext>;
23
24        #[unsafe(method(topLevelObject))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn topLevelObject(&self) -> Option<Retained<AnyObject>>;
27
28        /// Setter for [`topLevelObject`][Self::topLevelObject].
29        #[unsafe(method(setTopLevelObject:))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn setTopLevelObject(&self, top_level_object: Option<&AnyObject>);
32
33        #[unsafe(method(objectBeingTested))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn objectBeingTested(&self) -> Option<Retained<AnyObject>>;
36
37        /// Setter for [`objectBeingTested`][Self::objectBeingTested].
38        #[unsafe(method(setObjectBeingTested:))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn setObjectBeingTested(&self, object_being_tested: Option<&AnyObject>);
41
42        #[unsafe(method(rangeContainerObject))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn rangeContainerObject(&self) -> Option<Retained<AnyObject>>;
45
46        /// Setter for [`rangeContainerObject`][Self::rangeContainerObject].
47        #[unsafe(method(setRangeContainerObject:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setRangeContainerObject(&self, range_container_object: Option<&AnyObject>);
50    );
51}
52
53/// Methods declared on superclass `NSObject`.
54impl NSScriptExecutionContext {
55    extern_methods!(
56        #[unsafe(method(init))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59
60        #[unsafe(method(new))]
61        #[unsafe(method_family = new)]
62        pub unsafe fn new() -> Retained<Self>;
63    );
64}