objc2_quick_look_thumbnailing/generated/
QLThumbnailGenerationRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-uniform-type-identifiers")]
10use objc2_uniform_type_identifiers::*;
11
12use crate::*;
13
14#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct QLThumbnailGenerationRequestRepresentationTypes(pub NSUInteger);
19bitflags::bitflags! {
20 impl QLThumbnailGenerationRequestRepresentationTypes: NSUInteger {
21 #[doc(alias = "QLThumbnailGenerationRequestRepresentationTypeIcon")]
22 const Icon = 1<<0;
23 #[doc(alias = "QLThumbnailGenerationRequestRepresentationTypeLowQualityThumbnail")]
24 const LowQualityThumbnail = 1<<1;
25 #[doc(alias = "QLThumbnailGenerationRequestRepresentationTypeThumbnail")]
26 const Thumbnail = 1<<2;
27 #[doc(alias = "QLThumbnailGenerationRequestRepresentationTypeAll")]
28 const All = NSUIntegerMax as _;
29 }
30}
31
32unsafe impl Encode for QLThumbnailGenerationRequestRepresentationTypes {
33 const ENCODING: Encoding = NSUInteger::ENCODING;
34}
35
36unsafe impl RefEncode for QLThumbnailGenerationRequestRepresentationTypes {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40extern_class!(
41 #[unsafe(super(NSObject))]
43 #[derive(Debug, PartialEq, Eq, Hash)]
44 pub struct QLThumbnailGenerationRequest;
45);
46
47extern_conformance!(
48 unsafe impl NSCoding for QLThumbnailGenerationRequest {}
49);
50
51extern_conformance!(
52 unsafe impl NSCopying for QLThumbnailGenerationRequest {}
53);
54
55unsafe impl CopyingHelper for QLThumbnailGenerationRequest {
56 type Result = Self;
57}
58
59extern_conformance!(
60 unsafe impl NSObjectProtocol for QLThumbnailGenerationRequest {}
61);
62
63extern_conformance!(
64 unsafe impl NSSecureCoding for QLThumbnailGenerationRequest {}
65);
66
67impl QLThumbnailGenerationRequest {
68 extern_methods!(
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub unsafe fn new() -> Retained<Self>;
76
77 #[cfg(feature = "objc2-core-foundation")]
78 #[unsafe(method(initWithFileAtURL:size:scale:representationTypes:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithFileAtURL_size_scale_representationTypes(
89 this: Allocated<Self>,
90 url: &NSURL,
91 size: CGSize,
92 scale: CGFloat,
93 representation_types: QLThumbnailGenerationRequestRepresentationTypes,
94 ) -> Retained<Self>;
95
96 #[cfg(feature = "objc2-uniform-type-identifiers")]
97 #[unsafe(method(contentType))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn contentType(&self) -> Retained<UTType>;
101
102 #[cfg(feature = "objc2-uniform-type-identifiers")]
103 #[unsafe(method(setContentType:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setContentType(&self, content_type: Option<&UTType>);
109
110 #[cfg(feature = "objc2-core-foundation")]
111 #[unsafe(method(minimumDimension))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn minimumDimension(&self) -> CGFloat;
116
117 #[cfg(feature = "objc2-core-foundation")]
118 #[unsafe(method(setMinimumDimension:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn setMinimumDimension(&self, minimum_dimension: CGFloat);
122
123 #[unsafe(method(iconMode))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn iconMode(&self) -> bool;
131
132 #[unsafe(method(setIconMode:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setIconMode(&self, icon_mode: bool);
136
137 #[cfg(feature = "objc2-core-foundation")]
138 #[unsafe(method(size))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn size(&self) -> CGSize;
141
142 #[cfg(feature = "objc2-core-foundation")]
143 #[unsafe(method(scale))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn scale(&self) -> CGFloat;
146
147 #[unsafe(method(representationTypes))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn representationTypes(&self)
150 -> QLThumbnailGenerationRequestRepresentationTypes;
151 );
152}