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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvviewelementstyletype?language=objc)
// NS_ENUM
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVViewElementStyleType(pub NSInteger);
impl TVViewElementStyleType {
    #[doc(alias = "TVViewElementStyleTypeInteger")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Integer: Self = Self(1);
    #[doc(alias = "TVViewElementStyleTypeDouble")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Double: Self = Self(2);
    #[doc(alias = "TVViewElementStyleTypePoint")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Point: Self = Self(3);
    #[doc(alias = "TVViewElementStyleTypeString")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const String: Self = Self(4);
    #[doc(alias = "TVViewElementStyleTypeColor")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Color: Self = Self(5);
    #[doc(alias = "TVViewElementStyleTypeURL")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const URL: Self = Self(6);
    #[doc(alias = "TVViewElementStyleTypeTransform")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const Transform: Self = Self(7);
    #[doc(alias = "TVViewElementStyleTypeEdgeInsets")]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub const EdgeInsets: Self = Self(8);
}

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

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

extern_class!(
    /// Factory to register new styles to define custom style data.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvstylefactory?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Please use SwiftUI or UIKit"]
    pub struct TVStyleFactory;
);

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

impl TVStyleFactory {
    extern_methods!(
        #[deprecated = "Please use SwiftUI or UIKit"]
        #[unsafe(method(registerStyle:withType:inherited:))]
        #[unsafe(method_family = none)]
        pub unsafe fn registerStyle_withType_inherited(
            style_name: &NSString,
            r#type: TVViewElementStyleType,
            inherited: bool,
        );
    );
}

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