objc2_app_kit/generated/
NSPathControlItem.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspathcontrolitem?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSPathControlItem;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSPathControlItem {}
19);
20
21impl NSPathControlItem {
22    extern_methods!(
23        #[unsafe(method(title))]
24        #[unsafe(method_family = none)]
25        pub fn title(&self) -> Retained<NSString>;
26
27        /// Setter for [`title`][Self::title].
28        ///
29        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
30        #[unsafe(method(setTitle:))]
31        #[unsafe(method_family = none)]
32        pub fn setTitle(&self, title: &NSString);
33
34        #[unsafe(method(attributedTitle))]
35        #[unsafe(method_family = none)]
36        pub fn attributedTitle(&self) -> Retained<NSAttributedString>;
37
38        /// Setter for [`attributedTitle`][Self::attributedTitle].
39        ///
40        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
41        #[unsafe(method(setAttributedTitle:))]
42        #[unsafe(method_family = none)]
43        pub fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
44
45        #[cfg(feature = "NSImage")]
46        #[unsafe(method(image))]
47        #[unsafe(method_family = none)]
48        pub fn image(&self) -> Option<Retained<NSImage>>;
49
50        #[cfg(feature = "NSImage")]
51        /// Setter for [`image`][Self::image].
52        #[unsafe(method(setImage:))]
53        #[unsafe(method_family = none)]
54        pub fn setImage(&self, image: Option<&NSImage>);
55
56        #[unsafe(method(URL))]
57        #[unsafe(method_family = none)]
58        pub fn URL(&self) -> Option<Retained<NSURL>>;
59    );
60}
61
62/// Methods declared on superclass `NSObject`.
63impl NSPathControlItem {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub fn new() -> Retained<Self>;
72    );
73}
74
75impl DefaultRetained for NSPathControlItem {
76    #[inline]
77    fn default_retained() -> Retained<Self> {
78        Self::new()
79    }
80}