use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct TVBrowserTransitionAnimator;
);
extern_conformance!(
unsafe impl NSObjectProtocol for TVBrowserTransitionAnimator {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIViewControllerAnimatedTransitioning for TVBrowserTransitionAnimator {}
);
impl TVBrowserTransitionAnimator {
extern_methods!();
}
impl TVBrowserTransitionAnimator {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait TVBrowserViewControllerDataSource: NSObjectProtocol {
#[cfg(all(
feature = "TVDocumentViewController",
feature = "TVViewElement",
feature = "objc2-ui-kit"
))]
#[unsafe(method(browserViewController:documentViewControllerForElement:))]
#[unsafe(method_family = none)]
unsafe fn browserViewController_documentViewControllerForElement(
&self,
browser_view_controller: &TVBrowserViewController,
view_element: &TVViewElement,
) -> Option<Retained<TVDocumentViewController>>;
}
);
extern_protocol!(
pub unsafe trait TVBrowserViewControllerDelegate: NSObjectProtocol {
#[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
#[optional]
#[unsafe(method(browserViewController:willCenterOnViewElement:))]
#[unsafe(method_family = none)]
unsafe fn browserViewController_willCenterOnViewElement(
&self,
browser_view_controller: &TVBrowserViewController,
view_element: &TVViewElement,
);
#[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
#[optional]
#[unsafe(method(browserViewController:didCenterOnViewElement:))]
#[unsafe(method_family = none)]
unsafe fn browserViewController_didCenterOnViewElement(
&self,
browser_view_controller: &TVBrowserViewController,
view_element: &TVViewElement,
);
}
);
extern_class!(
#[unsafe(super(UIViewController, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-ui-kit")]
pub struct TVBrowserViewController;
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSCoding for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSObjectProtocol for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIAppearanceContainer for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIContentContainer for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIFocusEnvironment for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UITraitEnvironment for TVBrowserViewController {}
);
#[cfg(feature = "objc2-ui-kit")]
impl TVBrowserViewController {
extern_methods!(
#[cfg(feature = "TVViewElement")]
#[unsafe(method(viewElement))]
#[unsafe(method_family = none)]
pub unsafe fn viewElement(&self) -> Retained<TVViewElement>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(cornerRadius))]
#[unsafe(method_family = none)]
pub unsafe fn cornerRadius(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setCornerRadius:))]
#[unsafe(method_family = none)]
pub unsafe fn setCornerRadius(&self, corner_radius: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(interitemSpacing))]
#[unsafe(method_family = none)]
pub unsafe fn interitemSpacing(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setInteritemSpacing:))]
#[unsafe(method_family = none)]
pub unsafe fn setInteritemSpacing(&self, interitem_spacing: CGFloat);
#[unsafe(method(maskInset))]
#[unsafe(method_family = none)]
pub unsafe fn maskInset(&self) -> UIEdgeInsets;
#[unsafe(method(setMaskInset:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaskInset(&self, mask_inset: UIEdgeInsets);
#[cfg(feature = "TVViewElement")]
#[unsafe(method(centeredViewElement))]
#[unsafe(method_family = none)]
pub unsafe fn centeredViewElement(&self) -> Retained<TVViewElement>;
#[cfg(feature = "TVViewElement")]
#[unsafe(method(setCenteredViewElement:))]
#[unsafe(method_family = none)]
pub unsafe fn setCenteredViewElement(&self, centered_view_element: &TVViewElement);
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn TVBrowserViewControllerDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn TVBrowserViewControllerDelegate>>,
);
#[unsafe(method(dataSource))]
#[unsafe(method_family = none)]
pub unsafe fn dataSource(
&self,
) -> Option<Retained<ProtocolObject<dyn TVBrowserViewControllerDataSource>>>;
#[unsafe(method(setDataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn setDataSource(
&self,
data_source: Option<&ProtocolObject<dyn TVBrowserViewControllerDataSource>>,
);
#[cfg(feature = "TVViewElement")]
#[unsafe(method(viewControllerForElement:))]
#[unsafe(method_family = none)]
pub unsafe fn viewControllerForElement(
view_element: &TVViewElement,
mtm: MainThreadMarker,
) -> Option<Retained<Self>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSString>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-ui-kit")]
impl TVBrowserViewController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}