use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITextDragPreviewRenderer;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UITextDragPreviewRenderer {}
);
impl UITextDragPreviewRenderer {
extern_methods!(
#[cfg(feature = "NSLayoutManager")]
#[unsafe(method(initWithLayoutManager:range:))]
#[unsafe(method_family = init)]
pub fn initWithLayoutManager_range(
this: Allocated<Self>,
layout_manager: &NSLayoutManager,
range: NSRange,
) -> Retained<Self>;
#[cfg(feature = "NSLayoutManager")]
#[unsafe(method(initWithLayoutManager:range:unifyRects:))]
#[unsafe(method_family = init)]
pub fn initWithLayoutManager_range_unifyRects(
this: Allocated<Self>,
layout_manager: &NSLayoutManager,
range: NSRange,
unify_rects: bool,
) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSLayoutManager")]
#[unsafe(method(layoutManager))]
#[unsafe(method_family = none)]
pub fn layoutManager(&self) -> Retained<NSLayoutManager>;
#[cfg(feature = "UIImage")]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Retained<UIImage>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(firstLineRect))]
#[unsafe(method_family = none)]
pub fn firstLineRect(&self) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(bodyRect))]
#[unsafe(method_family = none)]
pub fn bodyRect(&self) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(lastLineRect))]
#[unsafe(method_family = none)]
pub fn lastLineRect(&self) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(adjustFirstLineRect:bodyRect:lastLineRect:textOrigin:))]
#[unsafe(method_family = none)]
pub unsafe fn adjustFirstLineRect_bodyRect_lastLineRect_textOrigin(
&self,
first_line_rect: NonNull<CGRect>,
body_rect: NonNull<CGRect>,
last_line_rect: NonNull<CGRect>,
origin: CGPoint,
);
);
}