//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_app_kit::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
use objc2_quartz_core::*;
use crate::*;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstylenone?language=objc)
pub const IKCellsStyleNone: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyleshadowed?language=objc)
pub const IKCellsStyleShadowed: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyleoutlined?language=objc)
pub const IKCellsStyleOutlined: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstyletitled?language=objc)
pub const IKCellsStyleTitled: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikcellsstylesubtitled?language=objc)
pub const IKCellsStyleSubtitled: c_uint = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikgroupbezelstyle?language=objc)
pub const IKGroupBezelStyle: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikgroupdisclosurestyle?language=objc)
pub const IKGroupDisclosureStyle: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserdropoperation?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct IKImageBrowserDropOperation(pub c_uint);
impl IKImageBrowserDropOperation {
#[doc(alias = "IKImageBrowserDropOn")]
pub const On: Self = Self(0);
#[doc(alias = "IKImageBrowserDropBefore")]
pub const Before: Self = Self(1);
}
unsafe impl Encode for IKImageBrowserDropOperation {
const ENCODING: Encoding = c_uint::ENCODING;
}
unsafe impl RefEncode for IKImageBrowserDropOperation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
mod private_NSObjectIKImageBrowserDataSource {
pub trait Sealed {}
}
/// Category "IKImageBrowserDataSource" on [`NSObject`].
///
/// The IKImageBrowserDataSource informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source object.
#[doc(alias = "IKImageBrowserDataSource")]
pub unsafe trait NSObjectIKImageBrowserDataSource:
ClassType + Sized + private_NSObjectIKImageBrowserDataSource::Sealed
{
extern_methods!(
/// Returns the number of records managed for aBrowser by the data source object (required).
///
/// An instance of IKImageView uses this method to determine how many cells it should create and display.
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(numberOfItemsInImageBrowser:))]
#[unsafe(method_family = none)]
unsafe fn numberOfItemsInImageBrowser(
&self,
a_browser: Option<&IKImageBrowserView>,
) -> NSUInteger;
/// Returns an object for the record in aBrowser corresponding to index
/// <i>
/// index
/// </i>
/// (required).
///
/// The returned object must implement the required methods of
/// <i>
/// IKImageBrowserItem
/// </i>
/// .
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(imageBrowser:itemAtIndex:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_itemAtIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
) -> Option<Retained<AnyObject>>;
/// Invoked by the image browser after it has been determined that a remove operation should be applied (optional)
///
/// The data source should update itself (usually by removing this indexes).
///
/// # Safety
///
/// - `a_browser` might not allow `None`.
/// - `indexes` might not allow `None`.
#[unsafe(method(imageBrowser:removeItemsAtIndexes:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_removeItemsAtIndexes(
&self,
a_browser: Option<&IKImageBrowserView>,
indexes: Option<&NSIndexSet>,
);
/// Invoked by the image browser after it has been determined that a reordering operation should be applied (optional).
///
/// The data source should update itself (usually by reordering its elements).
///
/// # Safety
///
/// - `a_browser` might not allow `None`.
/// - `indexes` might not allow `None`.
#[unsafe(method(imageBrowser:moveItemsAtIndexes:toIndex:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_moveItemsAtIndexes_toIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
indexes: Option<&NSIndexSet>,
destination_index: NSUInteger,
) -> bool;
/// This method is called after it has been determined that a drag should begin, but before the drag has been started. 'itemIndexes' contains the indexes that will be participating in the drag. Return the number of items effectively written to the pasteboard.
///
/// optional - drag and drop support
///
/// # Safety
///
/// - `a_browser` might not allow `None`.
/// - `item_indexes` might not allow `None`.
/// - `pasteboard` might not allow `None`.
#[unsafe(method(imageBrowser:writeItemsAtIndexes:toPasteboard:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_writeItemsAtIndexes_toPasteboard(
&self,
a_browser: Option<&IKImageBrowserView>,
item_indexes: Option<&NSIndexSet>,
pasteboard: Option<&NSPasteboard>,
) -> NSUInteger;
/// Returns the number of groups
///
/// this method is optional
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(numberOfGroupsInImageBrowser:))]
#[unsafe(method_family = none)]
unsafe fn numberOfGroupsInImageBrowser(
&self,
a_browser: Option<&IKImageBrowserView>,
) -> NSUInteger;
/// Returns the group at index 'index'
///
/// A group is defined by a dictionay. Keys for this dictionary are defined below.
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(imageBrowser:groupAtIndex:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_groupAtIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
) -> Option<Retained<NSDictionary>>;
);
}
impl private_NSObjectIKImageBrowserDataSource::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserDataSource for NSObject {}
mod private_NSObjectIKImageBrowserItem {
pub trait Sealed {}
}
/// Category "IKImageBrowserItem" on [`NSObject`].
///
/// The IKImageBrowserItem informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source for a given item.
///
/// Some of the methods in this protocol, such as
/// <i>
/// image
/// </i>
/// are called very frequently, so they must be efficient.
#[doc(alias = "IKImageBrowserItem")]
pub unsafe trait NSObjectIKImageBrowserItem:
ClassType + Sized + private_NSObjectIKImageBrowserItem::Sealed
{
extern_methods!(
/// Returns a unique string that identify this data source item (required).
///
/// The image browser uses this identifier to keep the correspondance between its cache and the data source item
#[unsafe(method(imageUID))]
#[unsafe(method_family = none)]
unsafe fn imageUID(&self) -> Option<Retained<NSString>>;
/// Returns the representation of the image to display (required).
///
/// Keys for imageRepresentationType are defined below.
#[unsafe(method(imageRepresentationType))]
#[unsafe(method_family = none)]
unsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>>;
/// Returns the image to display (required). Can return nil if the item has no image to display.
#[unsafe(method(imageRepresentation))]
#[unsafe(method_family = none)]
unsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>>;
/// Returns a version of this item. The receiver can return a new version to let the image browser knows that it shouldn't use its cache for this item
#[unsafe(method(imageVersion))]
#[unsafe(method_family = none)]
unsafe fn imageVersion(&self) -> NSUInteger;
/// Returns the title to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsTitleAttributesKey on the IKImageBrowserView instance to set text attributes.
#[unsafe(method(imageTitle))]
#[unsafe(method_family = none)]
unsafe fn imageTitle(&self) -> Option<Retained<NSString>>;
/// Returns the subtitle to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsSubtitleAttributesKey on the IKImageBrowserView instance to set text attributes.
#[unsafe(method(imageSubtitle))]
#[unsafe(method_family = none)]
unsafe fn imageSubtitle(&self) -> Option<Retained<NSString>>;
/// Returns whether this item is selectable.
///
/// The receiver can implement this methods to forbid selection of this item by returning NO.
#[unsafe(method(isSelectable))]
#[unsafe(method_family = none)]
unsafe fn isSelectable(&self) -> bool;
);
}
impl private_NSObjectIKImageBrowserItem::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserItem for NSObject {}
extern_class!(
/// An IKImageBrowserView object is a view that display and browse images and movies. It supports scrolling and zooming.
///
/// The IKImageBrowserView is deprecated. Please switch to NSCollectionView.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserview?language=objc)
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
pub struct IKImageBrowserView;
);
extern_conformance!(
unsafe impl NSAccessibility for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSAppearanceCustomization for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSCoding for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSDraggingDestination for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSDraggingSource for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for IKImageBrowserView {}
);
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for IKImageBrowserView {}
);
impl IKImageBrowserView {
extern_methods!();
}
/// Methods declared on superclass `NSView`.
impl IKImageBrowserView {
extern_methods!(
/// # Safety
///
/// `coder` possibly has further requirements.
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
/// Methods declared on superclass `NSResponder`.
impl IKImageBrowserView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl IKImageBrowserView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
/// IKMainMethods.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
extern_methods!(
/// The receiver's data source. the data source is not retained by the receiver.
///
/// # Safety
///
/// This is not retained internally, you must ensure the object is still alive.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(dataSource))]
#[unsafe(method_family = none)]
pub unsafe fn dataSource(&self) -> Option<Retained<AnyObject>>;
/// Setter for [`dataSource`][Self::dataSource].
///
/// # Safety
///
/// - `data_source` should be of the correct type.
/// - `data_source` might not allow `None`.
/// - This is unretained, you must ensure the object is kept alive while in use.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setDataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn setDataSource(&self, data_source: Option<&AnyObject>);
/// Marks the receiver as needing redisplay, so it will reload the data and draw the new values.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(reloadData))]
#[unsafe(method_family = none)]
pub unsafe fn reloadData(&self);
/// The receiver's delegate. aDelegate is expected to implement the IKImageBrowserDelegate informal protocol.
///
/// # Safety
///
/// This is not retained internally, you must ensure the object is still alive.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>;
/// Setter for [`delegate`][Self::delegate].
///
/// # Safety
///
/// - `delegate` should be of the correct type.
/// - `delegate` might not allow `None`.
/// - This is unretained, you must ensure the object is kept alive while in use.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(&self, delegate: Option<&AnyObject>);
);
}
/// IKAppearance.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
extern_methods!(
/// Defines the cells appearance style.
///
/// Parameter `mask`: An integer bit mask; see the discussion below.
///
/// mask can be specified by combining any of the options below using the C bitwise OR operator
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setCellsStyleMask:))]
#[unsafe(method_family = none)]
pub unsafe fn setCellsStyleMask(&self, mask: NSUInteger);
/// Return the cells appearance style mask.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(cellsStyleMask))]
#[unsafe(method_family = none)]
pub unsafe fn cellsStyleMask(&self) -> NSUInteger;
/// Sets whether the receiver constraints the cells's image to their original size. Default is NO.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setConstrainsToOriginalSize:))]
#[unsafe(method_family = none)]
pub unsafe fn setConstrainsToOriginalSize(&self, flag: bool);
/// Returns whether the receiver constraints the cells's image to their original size.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(constrainsToOriginalSize))]
#[unsafe(method_family = none)]
pub unsafe fn constrainsToOriginalSize(&self) -> bool;
#[cfg(feature = "objc2-quartz-core")]
/// Specifies the receiver�s background layer.
///
/// # Safety
///
/// `a_layer` might not allow `None`.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setBackgroundLayer:))]
#[unsafe(method_family = none)]
pub unsafe fn setBackgroundLayer(&self, a_layer: Option<&CALayer>);
#[cfg(feature = "objc2-quartz-core")]
/// Provides the receiver�s background layer.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(backgroundLayer))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundLayer(&self) -> Option<Retained<CALayer>>;
#[cfg(feature = "objc2-quartz-core")]
/// Specifies the receiver�s foreground layer.
///
/// # Safety
///
/// `a_layer` might not allow `None`.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setForegroundLayer:))]
#[unsafe(method_family = none)]
pub unsafe fn setForegroundLayer(&self, a_layer: Option<&CALayer>);
#[cfg(feature = "objc2-quartz-core")]
/// Provides the receiver�s foreground layer.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(foregroundLayer))]
#[unsafe(method_family = none)]
pub unsafe fn foregroundLayer(&self) -> Option<Retained<CALayer>>;
#[cfg(feature = "IKImageBrowserCell")]
/// Returns the cell to use for the specified item. The returned cell should not be autoreleased.
///
/// Parameter `The`: item that the returned cell will represent.
///
/// Subclasses can override this method to customize the appearance of the cell that will represent "anItem".
///
/// # Safety
///
/// - `an_item` should be of the correct type.
/// - `an_item` might not allow `None`.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(newCellForRepresentedItem:))]
#[unsafe(method_family = new)]
pub unsafe fn newCellForRepresentedItem(
&self,
an_item: Option<&AnyObject>,
) -> Option<Retained<IKImageBrowserCell>>;
#[cfg(feature = "IKImageBrowserCell")]
/// Returns the cell at the specified index.
///
/// Subclasses must not override this method.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(cellForItemAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn cellForItemAtIndex(
&self,
index: NSUInteger,
) -> Option<Retained<IKImageBrowserCell>>;
);
}
/// IKBrowsing.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
extern_methods!(
/// Sets the zoom value to
/// <i>
/// aValue
/// </i>
/// .
///
/// This value should be greater or equal to zero and less or equal than one. A zoom value of zero corresponds to the minimum size (40x40 pixels), A zoom value of one means images fit the browser bounds. Other values are interpolated.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setZoomValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setZoomValue(&self, a_value: c_float);
/// Returns the current zoom value.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(zoomValue))]
#[unsafe(method_family = none)]
pub unsafe fn zoomValue(&self) -> c_float;
/// Determines how the receiver resize its content when zooming.
///
/// mask can be specified by combining any of the following options using the C bitwise OR operator:NSViewWidthSizable NSViewHeightSizable, other values are ignored.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setContentResizingMask:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentResizingMask(&self, mask: NSUInteger);
/// Returns the receiver�s content resizing mask, which determines how it�s content is resized while zooming.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(contentResizingMask))]
#[unsafe(method_family = none)]
pub unsafe fn contentResizingMask(&self) -> NSUInteger;
/// Scrolls the receiver so the item at the specified index is visible.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(scrollIndexToVisible:))]
#[unsafe(method_family = none)]
pub unsafe fn scrollIndexToVisible(&self, index: NSInteger);
/// sets the size of the cells to size
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setCellSize:))]
#[unsafe(method_family = none)]
pub unsafe fn setCellSize(&self, size: NSSize);
/// Returns the size of the cells
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(cellSize))]
#[unsafe(method_family = none)]
pub unsafe fn cellSize(&self) -> NSSize;
/// Returns the spacing between cells in the image browser.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(intercellSpacing))]
#[unsafe(method_family = none)]
pub unsafe fn intercellSpacing(&self) -> NSSize;
/// Sets the spacing between cells in the matrix.
///
/// Parameter `aSize`: The vertical and horizontal spacing to use between cells in the receiver. By default, both values are 10.0 in the receiver�s coordinate system.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setIntercellSpacing:))]
#[unsafe(method_family = none)]
pub unsafe fn setIntercellSpacing(&self, a_size: NSSize);
/// Returns the item at the specified location or NSNotFound if no item at this location.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(indexOfItemAtPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn indexOfItemAtPoint(&self, point: NSPoint) -> NSInteger;
/// Returns the frame rectangle of the item that would be drawn at the specified location.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(itemFrameAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn itemFrameAtIndex(&self, index: NSInteger) -> NSRect;
/// Returns indexes of the receiver�s currently visible items.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(visibleItemIndexes))]
#[unsafe(method_family = none)]
pub unsafe fn visibleItemIndexes(&self) -> Option<Retained<NSIndexSet>>;
/// Returns the indexes of the receiver�s rows that intersect the specified rectangle.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(rowIndexesInRect:))]
#[unsafe(method_family = none)]
pub unsafe fn rowIndexesInRect(&self, rect: NSRect) -> Option<Retained<NSIndexSet>>;
/// Returns the indexes of the receiver�s columns that intersect the specified rectangle.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(columnIndexesInRect:))]
#[unsafe(method_family = none)]
pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Option<Retained<NSIndexSet>>;
/// Returns the rectangle containing the column at a given index.
///
/// Parameter `columnIndex`: The index of a column in the receiver.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(rectOfColumn:))]
#[unsafe(method_family = none)]
pub unsafe fn rectOfColumn(&self, column_index: NSUInteger) -> NSRect;
/// Returns the rectangle containing the row at a given index.
///
/// Parameter `rowIndex`: The index of a row in the receiver.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(rectOfRow:))]
#[unsafe(method_family = none)]
pub unsafe fn rectOfRow(&self, row_index: NSUInteger) -> NSRect;
/// Returns the number of rows in the receiver.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(numberOfRows))]
#[unsafe(method_family = none)]
pub unsafe fn numberOfRows(&self) -> NSUInteger;
/// Returns the number of columns in the receiver.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(numberOfColumns))]
#[unsafe(method_family = none)]
pub unsafe fn numberOfColumns(&self) -> NSUInteger;
/// Sets whether the receiver can automatically take control of the Quick Look panel.
///
/// Parameter `flag`: if YES, KImageBrowser can take control of the Quick Look panel automatically whenever it becomes first responder. This means that it provides the spacebar key store to open/close Quick Look panel and sets itself as the panel's datasource and delegate.
///
/// default value is NO. IKImageBrowserView's datasource items should provide file paths or URLs as their representation (see IKImageBrowserItem protocol).
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setCanControlQuickLookPanel:))]
#[unsafe(method_family = none)]
pub unsafe fn setCanControlQuickLookPanel(&self, flag: bool);
/// Returns a Boolean value that indicates whether the receiver can automatically take control of the Quick Look panel.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(canControlQuickLookPanel))]
#[unsafe(method_family = none)]
pub unsafe fn canControlQuickLookPanel(&self) -> bool;
);
}
/// IKSelectionReorderingAndGrouping.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
extern_methods!(
/// Returns the indexes of the selected cells
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(selectionIndexes))]
#[unsafe(method_family = none)]
pub unsafe fn selectionIndexes(&self) -> Option<Retained<NSIndexSet>>;
/// Selects cells at indexes
/// <i>
/// indexes
/// </i>
/// . If
/// <i>
/// extendSelection
/// </i>
/// is YES it extends the current selection, otherwise it replaces the current selection.
///
/// # Safety
///
/// `indexes` might not allow `None`.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setSelectionIndexes:byExtendingSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelectionIndexes_byExtendingSelection(
&self,
indexes: Option<&NSIndexSet>,
extend_selection: bool,
);
/// Controls whether the user can select more than one cell at a time.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setAllowsMultipleSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsMultipleSelection(&self, flag: bool);
/// Returns YES if the receiver allows the user to select more than one cell at a time, NO otherwise.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(allowsMultipleSelection))]
#[unsafe(method_family = none)]
pub unsafe fn allowsMultipleSelection(&self) -> bool;
/// Controls whether the receiver allows zero cell to be selected.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setAllowsEmptySelection:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsEmptySelection(&self, flag: bool);
/// Returns YES if the receiver allows the user to select zero cell, NO otherwise.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(allowsEmptySelection))]
#[unsafe(method_family = none)]
pub unsafe fn allowsEmptySelection(&self) -> bool;
/// Controls whether the user can reorder items.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setAllowsReordering:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsReordering(&self, flag: bool);
/// Returns YES if the receiver allows the user to reorder items, NO otherwise.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(allowsReordering))]
#[unsafe(method_family = none)]
pub unsafe fn allowsReordering(&self) -> bool;
/// Controls whether the receiver animate reordering and changes of the data source.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setAnimates:))]
#[unsafe(method_family = none)]
pub unsafe fn setAnimates(&self, flag: bool);
/// Returns YES if the receiver animate changes of the data source, NO otherwise.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(animates))]
#[unsafe(method_family = none)]
pub unsafe fn animates(&self) -> bool;
/// Expands group at index 'index' if it is not already expanded; otherwise, does nothing.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(expandGroupAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn expandGroupAtIndex(&self, index: NSUInteger);
/// Collapse group at index 'index' if it is expanded; otherwise, does nothing.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(collapseGroupAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn collapseGroupAtIndex(&self, index: NSUInteger);
/// Returns YES if the group at index 'index' is expanded.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(isGroupExpandedAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn isGroupExpandedAtIndex(&self, index: NSUInteger) -> bool;
);
}
/// IKDragNDrop.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
impl IKImageBrowserView {
extern_methods!(
/// Sets the receiver's dragging destination delegate to
/// <i>
/// delegate
/// </i>
/// .
///
/// # Safety
///
/// - `delegate` should be of the correct type.
/// - `delegate` might not allow `None`.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setDraggingDestinationDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDraggingDestinationDelegate(&self, delegate: Option<&AnyObject>);
/// Returns the receiver's dragging destination delegate.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(draggingDestinationDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn draggingDestinationDelegate(&self) -> Option<Retained<AnyObject>>;
/// Returns the index of the cell where the drop operation occured. This index is valid when a drop occurred and until next drop.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(indexAtLocationOfDroppedItem))]
#[unsafe(method_family = none)]
pub unsafe fn indexAtLocationOfDroppedItem(&self) -> NSUInteger;
/// Returns the current dropOperation. The returned value is valid when a drop occurred and until next drop.
///
/// Returns IKImageBrowserDropOn if the drop occurs on an item. Returns IKImageBrowserDropBefore otherwise.
/// In drag and drop, used to specify a dropOperation. For example, given a browser with N cells (numbered with cell 0 at the top left visually), a cell of N-1 and operation of IKImageBrowserDropOn would specify a drop on the last cell. To specify a drop after the last cell, one would use an index of N and IKImageBrowserDropBefore for the operation.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(dropOperation))]
#[unsafe(method_family = none)]
pub unsafe fn dropOperation(&self) -> IKImageBrowserDropOperation;
/// Controls whether the user can drop on items. Default is NO.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setAllowsDroppingOnItems:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsDroppingOnItems(&self, flag: bool);
/// Returns YES if the receiver allows the user to drop on items, NO otherwise.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(allowsDroppingOnItems))]
#[unsafe(method_family = none)]
pub unsafe fn allowsDroppingOnItems(&self) -> bool;
/// Used if you wish to �retarget� the proposed drop.
///
/// To specify a drop on the second item, one would specify index as 1, and operation as IKImageBrowserDropOn. To specify a drop after the last item, one would specify index as the number of items and operation as IKImageBrowserDropBefore. Passing a value of �1 for index, and IKImageBrowserDropOn as the operation causes the entire browser view to be highlighted rather than a specific item. This is useful if the data displayed by the receiver does not allow the user to drop items at a specific item location.
#[deprecated = "Deprecated - Please use NSCollectionView instead"]
#[unsafe(method(setDropIndex:dropOperation:))]
#[unsafe(method_family = none)]
pub unsafe fn setDropIndex_dropOperation(
&self,
index: NSInteger,
operation: IKImageBrowserDropOperation,
);
);
}
mod private_NSObjectIKImageBrowserDelegate {
pub trait Sealed {}
}
/// Category "IKImageBrowserDelegate" on [`NSObject`].
///
/// Informal protocol for image browser 's delegate
#[doc(alias = "IKImageBrowserDelegate")]
pub unsafe trait NSObjectIKImageBrowserDelegate:
ClassType + Sized + private_NSObjectIKImageBrowserDelegate::Sealed
{
extern_methods!(
/// Invoked by 'aBrowser' when the selection did change
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(imageBrowserSelectionDidChange:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowserSelectionDidChange(&self, a_browser: Option<&IKImageBrowserView>);
/// Invoked by 'aBrowser' when a cell was double clicked.
///
/// Parameter `index`: Index of the cell that was double clicked.
///
/// # Safety
///
/// `a_browser` might not allow `None`.
#[unsafe(method(imageBrowser:cellWasDoubleClickedAtIndex:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_cellWasDoubleClickedAtIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
);
/// Invoked by 'aBrowser' when a cell was right clicked or left clicked with the Alt key pressed.
///
/// Parameter `index`: Index of the cell that was right clicked.
///
/// # Safety
///
/// - `a_browser` might not allow `None`.
/// - `event` might not allow `None`.
#[unsafe(method(imageBrowser:cellWasRightClickedAtIndex:withEvent:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_cellWasRightClickedAtIndex_withEvent(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
event: Option<&NSEvent>,
);
/// Invoked by 'aBrowser' when a the background was right clicked or left clicked with the Alt key pressed.
///
/// # Safety
///
/// - `a_browser` might not allow `None`.
/// - `event` might not allow `None`.
#[unsafe(method(imageBrowser:backgroundWasRightClickedWithEvent:))]
#[unsafe(method_family = none)]
unsafe fn imageBrowser_backgroundWasRightClickedWithEvent(
&self,
a_browser: Option<&IKImageBrowserView>,
event: Option<&NSEvent>,
);
);
}
impl private_NSObjectIKImageBrowserDelegate::Sealed for NSObject {}
unsafe impl NSObjectIKImageBrowserDelegate for NSObject {}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserpathrepresentationtype?language=objc)
pub static IKImageBrowserPathRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsurlrepresentationtype?language=objc)
pub static IKImageBrowserNSURLRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsimagerepresentationtype?language=objc)
pub static IKImageBrowserNSImageRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercgimagerepresentationtype?language=objc)
pub static IKImageBrowserCGImageRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercgimagesourcerepresentationtype?language=objc)
pub static IKImageBrowserCGImageSourceRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsdatarepresentationtype?language=objc)
pub static IKImageBrowserNSDataRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsernsbitmapimagerepresentationtype?language=objc)
pub static IKImageBrowserNSBitmapImageRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqtmovierepresentationtype?language=objc)
pub static IKImageBrowserQTMovieRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqtmoviepathrepresentationtype?language=objc)
pub static IKImageBrowserQTMoviePathRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqccompositionrepresentationtype?language=objc)
pub static IKImageBrowserQCCompositionRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserqccompositionpathrepresentationtype?language=objc)
pub static IKImageBrowserQCCompositionPathRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserquicklookpathrepresentationtype?language=objc)
pub static IKImageBrowserQuickLookPathRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsericonrefpathrepresentationtype?language=objc)
pub static IKImageBrowserIconRefPathRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsericonrefrepresentationtype?language=objc)
pub static IKImageBrowserIconRefRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserpdfpagerepresentationtype?language=objc)
pub static IKImageBrowserPDFPageRepresentationType: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserbackgroundcolorkey?language=objc)
pub static IKImageBrowserBackgroundColorKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowserselectioncolorkey?language=objc)
pub static IKImageBrowserSelectionColorKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellsoutlinecolorkey?language=objc)
pub static IKImageBrowserCellsOutlineColorKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellstitleattributeskey?language=objc)
pub static IKImageBrowserCellsTitleAttributesKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellshighlightedtitleattributeskey?language=objc)
pub static IKImageBrowserCellsHighlightedTitleAttributesKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsercellssubtitleattributeskey?language=objc)
pub static IKImageBrowserCellsSubtitleAttributesKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergrouprangekey?language=objc)
pub static IKImageBrowserGroupRangeKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupbackgroundcolorkey?language=objc)
pub static IKImageBrowserGroupBackgroundColorKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergrouptitlekey?language=objc)
pub static IKImageBrowserGroupTitleKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupstylekey?language=objc)
pub static IKImageBrowserGroupStyleKey: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupheaderlayer?language=objc)
pub static IKImageBrowserGroupHeaderLayer: Option<&'static NSString>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikimagebrowsergroupfooterlayer?language=objc)
pub static IKImageBrowserGroupFooterLayer: Option<&'static NSString>;
}