pub struct QLThumbnail { /* private fields */ }QLThumbnail only.Expand description
Implementations§
Source§impl QLThumbnail
impl QLThumbnail
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
url: Option<&CFURL>,
max_thumbnail_size: CGSize,
options: Option<&CFDictionary>,
) -> Option<CFRetained<QLThumbnail>>
👎Deprecated: Use QLThumbnailGenerationRequest in QuickLookThumbnailing to generate thumbnails.
pub unsafe fn new( allocator: Option<&CFAllocator>, url: Option<&CFURL>, max_thumbnail_size: CGSize, options: Option<&CFDictionary>, ) -> Option<CFRetained<QLThumbnail>>
§Safety
allocatormight not allowNone.urlmight not allowNone.optionsgenerics must be of the correct type.optionsmight not allowNone.
pub unsafe fn document_url(&self) -> Option<CFRetained<CFURL>>
pub unsafe fn maximum_size(&self) -> CGSize
pub unsafe fn options(&self) -> Option<CFRetained<CFDictionary>>
Sourcepub unsafe fn dispatch_async(
&self,
queue: Option<&DispatchQueue>,
completion: dispatch_block_t,
)
👎Deprecated: Use QLThumbnailGenerator in QuickLookThumbnailing to generate thumbnails.Available on crate feature dispatch2 only.
pub unsafe fn dispatch_async( &self, queue: Option<&DispatchQueue>, completion: dispatch_block_t, )
dispatch2 only.§Safety
queuepossibly has additional threading requirements.queuemight not allowNone.completionmust be a valid pointer.
pub unsafe fn image(&self) -> Option<CFRetained<CGImage>>
objc2-core-graphics only.pub unsafe fn content_rect(&self) -> CGRect
pub unsafe fn cancel(&self)
pub unsafe fn is_cancelled(&self) -> bool
Source§impl QLThumbnail
impl QLThumbnail
Sourcepub unsafe fn image_create(
allocator: Option<&CFAllocator>,
url: Option<&CFURL>,
max_thumbnail_size: CGSize,
options: Option<&CFDictionary>,
) -> Option<CFRetained<CGImage>>
👎Deprecated: Use QuickLookThumbnailing to generate thumbnails for files.Available on crate features QLThumbnailImage and objc2-core-graphics only.
pub unsafe fn image_create( allocator: Option<&CFAllocator>, url: Option<&CFURL>, max_thumbnail_size: CGSize, options: Option<&CFDictionary>, ) -> Option<CFRetained<CGImage>>
QLThumbnailImage and objc2-core-graphics only.Creates a thumbnail for the designated file. Returns NULL if Quick Look does not support this file type.
Parameter allocator: The allocator to use to create the image.
Parameter url: The URL to the file.
Parameter maxThumbnailSize: The maximum desired size.
Parameter options: See options below.
Returns: The thumbnail image. NULL if not available.
QLThumbnailImageCreate() does not replace IconServices. Also QLThumbnailImageCreate() will block until the thumbnail is generated so you should consider calling it in a thread.
§Safety
allocatormight not allowNone.urlmight not allowNone.optionsgenerics must be of the correct type.optionsmight not allowNone.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for QLThumbnail
impl AsRef<AnyObject> for QLThumbnail
Source§impl AsRef<CFType> for QLThumbnail
impl AsRef<CFType> for QLThumbnail
Source§impl AsRef<QLThumbnail> for QLThumbnail
impl AsRef<QLThumbnail> for QLThumbnail
Source§impl Borrow<AnyObject> for QLThumbnail
impl Borrow<AnyObject> for QLThumbnail
Source§impl Borrow<CFType> for QLThumbnail
impl Borrow<CFType> for QLThumbnail
Source§impl ConcreteType for QLThumbnail
impl ConcreteType for QLThumbnail
Source§impl Debug for QLThumbnail
impl Debug for QLThumbnail
Source§impl Deref for QLThumbnail
impl Deref for QLThumbnail
Source§impl Hash for QLThumbnail
impl Hash for QLThumbnail
Source§impl Message for QLThumbnail
impl Message for QLThumbnail
Source§impl PartialEq for QLThumbnail
impl PartialEq for QLThumbnail
Source§impl RefEncode for QLThumbnail
impl RefEncode for QLThumbnail
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for QLThumbnail
impl Type for QLThumbnail
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more