objc2-watch-kit 0.3.2

Bindings to the WatchKit 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::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfacetable?language=objc)
    #[unsafe(super(WKInterfaceObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "WKInterfaceObject")]
    pub struct WKInterfaceTable;
);

#[cfg(feature = "WKInterfaceObject")]
extern_conformance!(
    unsafe impl NSObjectProtocol for WKInterfaceTable {}
);

#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceTable {
    extern_methods!(
        #[unsafe(method(setRowTypes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRowTypes(&self, row_types: &NSArray<NSString>);

        #[unsafe(method(setNumberOfRows:withRowType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNumberOfRows_withRowType(
            &self,
            number_of_rows: NSInteger,
            row_type: &NSString,
        );

        #[unsafe(method(numberOfRows))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfRows(&self) -> NSInteger;

        #[unsafe(method(rowControllerAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn rowControllerAtIndex(&self, index: NSInteger) -> Option<Retained<AnyObject>>;

        #[unsafe(method(insertRowsAtIndexes:withRowType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn insertRowsAtIndexes_withRowType(
            &self,
            rows: &NSIndexSet,
            row_type: &NSString,
        );

        #[unsafe(method(removeRowsAtIndexes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeRowsAtIndexes(&self, rows: &NSIndexSet);

        #[unsafe(method(scrollToRowAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn scrollToRowAtIndex(&self, index: NSInteger);

        #[unsafe(method(performSegueForRow:))]
        #[unsafe(method_family = none)]
        pub unsafe fn performSegueForRow(&self, row: NSInteger);

        #[unsafe(method(curvesAtTop))]
        #[unsafe(method_family = none)]
        pub unsafe fn curvesAtTop(&self) -> bool;

        /// Setter for [`curvesAtTop`][Self::curvesAtTop].
        #[unsafe(method(setCurvesAtTop:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCurvesAtTop(&self, curves_at_top: bool);

        #[unsafe(method(curvesAtBottom))]
        #[unsafe(method_family = none)]
        pub unsafe fn curvesAtBottom(&self) -> bool;

        /// Setter for [`curvesAtBottom`][Self::curvesAtBottom].
        #[unsafe(method(setCurvesAtBottom:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCurvesAtBottom(&self, curves_at_bottom: bool);
    );
}

/// Methods declared on superclass `WKInterfaceObject`.
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceTable {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceTable {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}