objc2-tv-ml-kit 0.3.2

Bindings to the TVMLKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
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::*;

/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvelementalignment?language=objc)
// NS_ENUM
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVElementAlignment(pub NSInteger);
impl TVElementAlignment {
    #[doc(alias = "TVElementAlignmentUndefined")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Undefined: Self = Self(0);
    #[doc(alias = "TVElementAlignmentLeft")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Left: Self = Self(1);
    #[doc(alias = "TVElementAlignmentCenter")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Center: Self = Self(2);
    #[doc(alias = "TVElementAlignmentRight")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Right: Self = Self(3);
    #[doc(alias = "TVElementAlignmentLeading")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Leading: Self = Self(4);
    #[doc(alias = "TVElementAlignmentTrailing")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Trailing: Self = Self(5);
}

unsafe impl Encode for TVElementAlignment {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for TVElementAlignment {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvelementcontentalignment?language=objc)
// NS_ENUM
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVElementContentAlignment(pub NSInteger);
impl TVElementContentAlignment {
    #[doc(alias = "TVElementContentAlignmentUndefined")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Undefined: Self = Self(0);
    #[doc(alias = "TVElementContentAlignmentTop")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Top: Self = Self(1);
    #[doc(alias = "TVElementContentAlignmentCenter")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Center: Self = Self(2);
    #[doc(alias = "TVElementContentAlignmentBottom")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Bottom: Self = Self(3);
}

unsafe impl Encode for TVElementContentAlignment {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for TVElementContentAlignment {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvelementposition?language=objc)
// NS_ENUM
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVElementPosition(pub NSInteger);
impl TVElementPosition {
    #[doc(alias = "TVElementPositionUndefined")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Undefined: Self = Self(0);
    #[doc(alias = "TVElementPositionCenter")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Center: Self = Self(1);
    #[doc(alias = "TVElementPositionTop")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Top: Self = Self(2);
    #[doc(alias = "TVElementPositionBottom")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Bottom: Self = Self(3);
    #[doc(alias = "TVElementPositionLeft")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Left: Self = Self(4);
    #[doc(alias = "TVElementPositionRight")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Right: Self = Self(5);
    #[doc(alias = "TVElementPositionTopLeft")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const TopLeft: Self = Self(6);
    #[doc(alias = "TVElementPositionTopRight")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const TopRight: Self = Self(7);
    #[doc(alias = "TVElementPositionBottomLeft")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const BottomLeft: Self = Self(8);
    #[doc(alias = "TVElementPositionBottomRight")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const BottomRight: Self = Self(9);
    #[doc(alias = "TVElementPositionHeader")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Header: Self = Self(10);
    #[doc(alias = "TVElementPositionFooter")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Footer: Self = Self(11);
    #[doc(alias = "TVElementPositionLeading")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Leading: Self = Self(12);
    #[doc(alias = "TVElementPositionTrailing")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Trailing: Self = Self(13);
    #[doc(alias = "TVElementPositionTopLeading")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const TopLeading: Self = Self(14);
    #[doc(alias = "TVElementPositionTopTrailing")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const TopTrailing: Self = Self(15);
    #[doc(alias = "TVElementPositionBottomLeading")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const BottomLeading: Self = Self(16);
    #[doc(alias = "TVElementPositionBottomTrailing")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const BottomTrailing: Self = Self(17);
}

unsafe impl Encode for TVElementPosition {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for TVElementPosition {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// An instance of TVViewElementStyle contains the set of styles applied to the view element.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvviewelementstyle?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub struct TVViewElementStyle;
);

extern_conformance!(
    unsafe impl NSCopying for TVViewElementStyle {}
);

unsafe impl CopyingHelper for TVViewElementStyle {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for TVViewElementStyle {}
);

impl TVViewElementStyle {
    extern_methods!(
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(valueForStyleProperty:))]
        #[unsafe(method_family = none)]
        pub unsafe fn valueForStyleProperty(&self, name: &NSString) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "TVColor")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(backgroundColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundColor(&self) -> Option<Retained<TVColor>>;

        #[cfg(feature = "TVColor")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(color))]
        #[unsafe(method_family = none)]
        pub unsafe fn color(&self) -> Option<Retained<TVColor>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(fontSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontSize(&self) -> CGFloat;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(fontWeight))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontWeight(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(height))]
        #[unsafe(method_family = none)]
        pub unsafe fn height(&self) -> CGFloat;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(margin))]
        #[unsafe(method_family = none)]
        pub unsafe fn margin(&self) -> UIEdgeInsets;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(focusMargin))]
        #[unsafe(method_family = none)]
        pub unsafe fn focusMargin(&self) -> UIEdgeInsets;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(maxHeight))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxHeight(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(maxWidth))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxWidth(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(minHeight))]
        #[unsafe(method_family = none)]
        pub unsafe fn minHeight(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(minWidth))]
        #[unsafe(method_family = none)]
        pub unsafe fn minWidth(&self) -> CGFloat;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(padding))]
        #[unsafe(method_family = none)]
        pub unsafe fn padding(&self) -> UIEdgeInsets;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(textAlignment))]
        #[unsafe(method_family = none)]
        pub unsafe fn textAlignment(&self) -> NSTextAlignment;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(width))]
        #[unsafe(method_family = none)]
        pub unsafe fn width(&self) -> CGFloat;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(alignment))]
        #[unsafe(method_family = none)]
        pub unsafe fn alignment(&self) -> TVElementAlignment;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(contentAlignment))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentAlignment(&self) -> TVElementContentAlignment;

        #[cfg(feature = "TVColor")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(highlightColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn highlightColor(&self) -> Option<Retained<TVColor>>;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(imageTreatmentName))]
        #[unsafe(method_family = none)]
        pub unsafe fn imageTreatmentName(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(interitemSpacing))]
        #[unsafe(method_family = none)]
        pub unsafe fn interitemSpacing(&self) -> CGFloat;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(textHighlightStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn textHighlightStyle(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(textMinimumScaleFactor))]
        #[unsafe(method_family = none)]
        pub unsafe fn textMinimumScaleFactor(&self) -> CGFloat;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(position))]
        #[unsafe(method_family = none)]
        pub unsafe fn position(&self) -> TVElementPosition;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(ratingStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn ratingStyle(&self) -> Option<Retained<NSString>>;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(maxTextLines))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxTextLines(&self) -> NSUInteger;

        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(textStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn textStyle(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "TVColor")]
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(tintColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn tintColor(&self) -> Option<Retained<TVColor>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl TVViewElementStyle {
    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() -> Retained<Self>;
    );
}