pub unsafe trait QLPreviewPanelDataSource {
// Provided methods
unsafe fn numberOfPreviewItemsInPreviewPanel(
&self,
panel: Option<&QLPreviewPanel>,
) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn previewPanel_previewItemAtIndex(
&self,
panel: Option<&QLPreviewPanel>,
index: NSInteger,
) -> Option<Retained<ProtocolObject<dyn QLPreviewItem>>>
where Self: Sized + Message { ... }
}Available on crate feature
QLPreviewPanel only.Expand description
A protocol that the Quick Look preview panel uses to access the contents of its data source object.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn numberOfPreviewItemsInPreviewPanel(
&self,
panel: Option<&QLPreviewPanel>,
) -> NSInteger
Available on crate feature objc2-app-kit only.
unsafe fn numberOfPreviewItemsInPreviewPanel( &self, panel: Option<&QLPreviewPanel>, ) -> NSInteger
objc2-app-kit only.Returns the number of items that the preview panel should preview.
-
Parameters:
-
panel: The preview panel.
-
Returns: The number of items the preview panel should display.
§Safety
panel might not allow None.
Sourceunsafe fn previewPanel_previewItemAtIndex(
&self,
panel: Option<&QLPreviewPanel>,
index: NSInteger,
) -> Option<Retained<ProtocolObject<dyn QLPreviewItem>>>
Available on crate features QLPreviewItem and objc2-app-kit only.
unsafe fn previewPanel_previewItemAtIndex( &self, panel: Option<&QLPreviewPanel>, index: NSInteger, ) -> Option<Retained<ProtocolObject<dyn QLPreviewItem>>>
QLPreviewItem and objc2-app-kit only.Returns the item that the preview panel should preview at a given index.
-
Parameters:
-
panel: The preview panel.
-
index: The index of the item to preview.
-
Returns: The item that the preview panel should preview at index
index.
§Safety
panel might not allow None.