objc2_quick_look_thumbnailing/generated/
QLThumbnailRequest.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::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// This class contains information about the thumbnail that should be provided.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/quicklookthumbnailing/qlfilethumbnailrequest?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct QLFileThumbnailRequest;
18);
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for QLFileThumbnailRequest {}
22);
23
24impl QLFileThumbnailRequest {
25    extern_methods!(
26        #[cfg(feature = "objc2-core-foundation")]
27        /// The maximum size of the generated thumbnail that will be accepted. This is also the preferred size, ideally either the width or the height will match the maximumSize's width or height respectively.
28        #[unsafe(method(maximumSize))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn maximumSize(&self) -> CGSize;
31
32        #[cfg(feature = "objc2-core-foundation")]
33        /// The minimum size of the generated thumbnail that will be accepted.
34        #[unsafe(method(minimumSize))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn minimumSize(&self) -> CGSize;
37
38        #[cfg(feature = "objc2-core-foundation")]
39        /// The scale of the requested thumbnail.
40        #[unsafe(method(scale))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn scale(&self) -> CGFloat;
43
44        /// The url of the file for which a thumbnail is being requested.
45        #[unsafe(method(fileURL))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn fileURL(&self) -> Retained<NSURL>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl QLFileThumbnailRequest {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}