objc2_app_kit/generated/
NSAdaptiveImageGlyph.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6#[cfg(feature = "objc2-uniform-type-identifiers")]
7#[cfg(target_vendor = "apple")]
8use objc2_uniform_type_identifiers::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsadaptiveimageglyph?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct NSAdaptiveImageGlyph;
17);
18
19unsafe impl Send for NSAdaptiveImageGlyph {}
20
21unsafe impl Sync for NSAdaptiveImageGlyph {}
22
23extern_conformance!(
24    unsafe impl NSCoding for NSAdaptiveImageGlyph {}
25);
26
27extern_conformance!(
28    unsafe impl NSCopying for NSAdaptiveImageGlyph {}
29);
30
31unsafe impl CopyingHelper for NSAdaptiveImageGlyph {
32    type Result = Self;
33}
34
35extern_conformance!(
36    unsafe impl NSObjectProtocol for NSAdaptiveImageGlyph {}
37);
38
39extern_conformance!(
40    unsafe impl NSSecureCoding for NSAdaptiveImageGlyph {}
41);
42
43impl NSAdaptiveImageGlyph {
44    extern_methods!(
45        #[unsafe(method(initWithImageContent:))]
46        #[unsafe(method_family = init)]
47        pub fn initWithImageContent(
48            this: Allocated<Self>,
49            image_content: &NSData,
50        ) -> Retained<Self>;
51
52        /// # Safety
53        ///
54        /// `coder` possibly has further requirements.
55        #[unsafe(method(initWithCoder:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
58
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63        #[unsafe(method(imageContent))]
64        #[unsafe(method_family = none)]
65        pub fn imageContent(&self) -> Retained<NSData>;
66
67        #[unsafe(method(contentIdentifier))]
68        #[unsafe(method_family = none)]
69        pub fn contentIdentifier(&self) -> Retained<NSString>;
70
71        #[unsafe(method(contentDescription))]
72        #[unsafe(method_family = none)]
73        pub fn contentDescription(&self) -> Retained<NSString>;
74
75        #[cfg(feature = "objc2-uniform-type-identifiers")]
76        #[cfg(target_vendor = "apple")]
77        #[unsafe(method(contentType))]
78        #[unsafe(method_family = none)]
79        pub fn contentType() -> Retained<UTType>;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl NSAdaptiveImageGlyph {
85    extern_methods!(
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}
91
92mod private_NSAttributedStringAdaptiveImageGlyphConveniences {
93    pub trait Sealed {}
94}
95
96/// Category on [`NSAttributedString`].
97pub unsafe trait NSAttributedStringAdaptiveImageGlyphConveniences:
98    ClassType + Sized + private_NSAttributedStringAdaptiveImageGlyphConveniences::Sealed
99{
100    extern_methods!(
101        /// # Safety
102        ///
103        /// `attributes` generic should be of the correct type.
104        #[unsafe(method(attributedStringWithAdaptiveImageGlyph:attributes:))]
105        #[unsafe(method_family = none)]
106        unsafe fn attributedStringWithAdaptiveImageGlyph_attributes(
107            adaptive_image_glyph: &NSAdaptiveImageGlyph,
108            attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
109        ) -> Retained<Self>;
110    );
111}
112
113impl private_NSAttributedStringAdaptiveImageGlyphConveniences::Sealed for NSAttributedString {}
114unsafe impl NSAttributedStringAdaptiveImageGlyphConveniences for NSAttributedString {}