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