objc2_ui_kit/generated/
UIFocusMovementHint.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8#[cfg(feature = "objc2-quartz-core")]
9#[cfg(not(target_os = "watchos"))]
10use objc2_quartz_core::*;
11
12use crate::*;
13
14extern_class!(
15    /// Provides information about the current state of hinting for the focused item.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uifocusmovementhint?language=objc)
18    #[unsafe(super(NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    pub struct UIFocusMovementHint;
21);
22
23extern_conformance!(
24    unsafe impl NSCopying for UIFocusMovementHint {}
25);
26
27unsafe impl CopyingHelper for UIFocusMovementHint {
28    type Result = Self;
29}
30
31extern_conformance!(
32    unsafe impl NSObjectProtocol for UIFocusMovementHint {}
33);
34
35impl UIFocusMovementHint {
36    extern_methods!(
37        #[cfg(feature = "objc2-core-foundation")]
38        /// Value between {-1.0, -1.0} and {1.0, 1.0} representing how close focus is to moving in a particular direction.
39        #[unsafe(method(movementDirection))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn movementDirection(&self) -> CGVector;
42
43        #[cfg(feature = "objc2-quartz-core")]
44        #[cfg(not(target_os = "watchos"))]
45        /// A 3D transform representing the perspective matrix that should be applied to match the system interaction hinting. Assumes a 0..1 near/far plane.
46        #[unsafe(method(perspectiveTransform))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn perspectiveTransform(&self) -> CATransform3D;
49
50        #[cfg(feature = "objc2-core-foundation")]
51        /// A vector representing the X and Y axis rotation expressed in radians that should be applied to match the system interaction hinting.
52        #[unsafe(method(rotation))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn rotation(&self) -> CGVector;
55
56        #[cfg(feature = "objc2-core-foundation")]
57        /// A vector representing the X and Y axis translation expressed in points that should be applied to match the system interaction hinting.
58        #[unsafe(method(translation))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn translation(&self) -> CGVector;
61
62        #[cfg(feature = "objc2-quartz-core")]
63        #[cfg(not(target_os = "watchos"))]
64        /// A 3D transform that contains the combined transformations of perspective, rotation and translation.
65        #[unsafe(method(interactionTransform))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn interactionTransform(&self) -> CATransform3D;
68
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76    );
77}