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 unsafe fn initWithImageContent(
48            this: Allocated<Self>,
49            image_content: &NSData,
50        ) -> Retained<Self>;
51
52        #[unsafe(method(initWithCoder:))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
55
56        #[unsafe(method(init))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59
60        #[unsafe(method(imageContent))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn imageContent(&self) -> Retained<NSData>;
63
64        #[unsafe(method(contentIdentifier))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn contentIdentifier(&self) -> Retained<NSString>;
67
68        #[unsafe(method(contentDescription))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn contentDescription(&self) -> Retained<NSString>;
71
72        #[cfg(feature = "objc2-uniform-type-identifiers")]
73        #[cfg(target_vendor = "apple")]
74        #[unsafe(method(contentType))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn contentType() -> Retained<UTType>;
77    );
78}
79
80/// Methods declared on superclass `NSObject`.
81impl NSAdaptiveImageGlyph {
82    extern_methods!(
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}
88
89mod private_NSAttributedStringAdaptiveImageGlyphConveniences {
90    pub trait Sealed {}
91}
92
93/// Category on [`NSAttributedString`].
94pub unsafe trait NSAttributedStringAdaptiveImageGlyphConveniences:
95    ClassType + Sized + private_NSAttributedStringAdaptiveImageGlyphConveniences::Sealed
96{
97    extern_methods!(
98        #[unsafe(method(attributedStringWithAdaptiveImageGlyph:attributes:))]
99        #[unsafe(method_family = none)]
100        unsafe fn attributedStringWithAdaptiveImageGlyph_attributes(
101            adaptive_image_glyph: &NSAdaptiveImageGlyph,
102            attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
103        ) -> Retained<Self>;
104    );
105}
106
107impl private_NSAttributedStringAdaptiveImageGlyphConveniences::Sealed for NSAttributedString {}
108unsafe impl NSAttributedStringAdaptiveImageGlyphConveniences for NSAttributedString {}