objc2_app_kit/generated/
NSTextStorageScripting.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// Scripting.
11#[cfg(feature = "NSTextStorage")]
12impl NSTextStorage {
13    extern_methods!(
14        #[unsafe(method(attributeRuns))]
15        #[unsafe(method_family = none)]
16        pub fn attributeRuns(&self) -> Retained<NSArray<NSTextStorage>>;
17
18        /// Setter for [`attributeRuns`][Self::attributeRuns].
19        ///
20        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
21        #[unsafe(method(setAttributeRuns:))]
22        #[unsafe(method_family = none)]
23        pub fn setAttributeRuns(&self, attribute_runs: &NSArray<NSTextStorage>);
24
25        #[unsafe(method(paragraphs))]
26        #[unsafe(method_family = none)]
27        pub fn paragraphs(&self) -> Retained<NSArray<NSTextStorage>>;
28
29        /// Setter for [`paragraphs`][Self::paragraphs].
30        ///
31        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
32        #[unsafe(method(setParagraphs:))]
33        #[unsafe(method_family = none)]
34        pub fn setParagraphs(&self, paragraphs: &NSArray<NSTextStorage>);
35
36        #[unsafe(method(words))]
37        #[unsafe(method_family = none)]
38        pub fn words(&self) -> Retained<NSArray<NSTextStorage>>;
39
40        /// Setter for [`words`][Self::words].
41        ///
42        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
43        #[unsafe(method(setWords:))]
44        #[unsafe(method_family = none)]
45        pub fn setWords(&self, words: &NSArray<NSTextStorage>);
46
47        #[unsafe(method(characters))]
48        #[unsafe(method_family = none)]
49        pub fn characters(&self) -> Retained<NSArray<NSTextStorage>>;
50
51        /// Setter for [`characters`][Self::characters].
52        ///
53        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
54        #[unsafe(method(setCharacters:))]
55        #[unsafe(method_family = none)]
56        pub fn setCharacters(&self, characters: &NSArray<NSTextStorage>);
57
58        #[cfg(feature = "NSFont")]
59        #[unsafe(method(font))]
60        #[unsafe(method_family = none)]
61        pub fn font(&self) -> Option<Retained<NSFont>>;
62
63        #[cfg(feature = "NSFont")]
64        /// Setter for [`font`][Self::font].
65        #[unsafe(method(setFont:))]
66        #[unsafe(method_family = none)]
67        pub fn setFont(&self, font: Option<&NSFont>);
68
69        #[cfg(feature = "NSColor")]
70        #[unsafe(method(foregroundColor))]
71        #[unsafe(method_family = none)]
72        pub fn foregroundColor(&self) -> Option<Retained<NSColor>>;
73
74        #[cfg(feature = "NSColor")]
75        /// Setter for [`foregroundColor`][Self::foregroundColor].
76        #[unsafe(method(setForegroundColor:))]
77        #[unsafe(method_family = none)]
78        pub fn setForegroundColor(&self, foreground_color: Option<&NSColor>);
79    );
80}