//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIScrollViewIndicatorStyle(pub NSInteger);
impl UIScrollViewIndicatorStyle {
    #[doc(alias = "UIScrollViewIndicatorStyleDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIScrollViewIndicatorStyleBlack")]
    pub const Black: Self = Self(1);
    #[doc(alias = "UIScrollViewIndicatorStyleWhite")]
    pub const White: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIScrollViewKeyboardDismissMode(pub NSInteger);
impl UIScrollViewKeyboardDismissMode {
    #[doc(alias = "UIScrollViewKeyboardDismissModeNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "UIScrollViewKeyboardDismissModeOnDrag")]
    pub const OnDrag: Self = Self(1);
    #[doc(alias = "UIScrollViewKeyboardDismissModeInteractive")]
    pub const Interactive: Self = Self(2);
    #[doc(alias = "UIScrollViewKeyboardDismissModeOnDragWithAccessory")]
    pub const OnDragWithAccessory: Self = Self(3);
    #[doc(alias = "UIScrollViewKeyboardDismissModeInteractiveWithAccessory")]
    pub const InteractiveWithAccessory: Self = Self(4);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIScrollViewIndexDisplayMode(pub NSInteger);
impl UIScrollViewIndexDisplayMode {
    #[doc(alias = "UIScrollViewIndexDisplayModeAutomatic")]
    pub const Automatic: Self = Self(0);
    #[doc(alias = "UIScrollViewIndexDisplayModeAlwaysHidden")]
    pub const AlwaysHidden: Self = Self(1);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIScrollViewContentInsetAdjustmentBehavior(pub NSInteger);
impl UIScrollViewContentInsetAdjustmentBehavior {
    pub const UIScrollViewContentInsetAdjustmentAutomatic: Self = Self(0);
    pub const UIScrollViewContentInsetAdjustmentScrollableAxes: Self = Self(1);
    pub const UIScrollViewContentInsetAdjustmentNever: Self = Self(2);
    pub const UIScrollViewContentInsetAdjustmentAlways: Self = Self(3);
}

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

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

// NS_TYPED_ENUM
pub type UIScrollViewDecelerationRate = CGFloat;

extern "C" {
    pub static UIScrollViewDecelerationRateNormal: UIScrollViewDecelerationRate;
}

extern "C" {
    pub static UIScrollViewDecelerationRateFast: UIScrollViewDecelerationRate;
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    pub struct UIScrollView;

    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl ClassType for UIScrollView {
        #[inherits(UIResponder, NSObject)]
        type Super = UIView;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(all(
    feature = "UIResponder",
    feature = "UIView",
    feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
unsafe impl CALayerDelegate for UIScrollView {}

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
unsafe impl NSCoding for UIScrollView {}

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
unsafe impl NSObjectProtocol for UIScrollView {}

#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIAppearance for UIScrollView {}

#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIAppearanceContainer for UIScrollView {}

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
unsafe impl UICoordinateSpace for UIScrollView {}

#[cfg(all(
    feature = "UIDynamicBehavior",
    feature = "UIResponder",
    feature = "UIView"
))]
unsafe impl UIDynamicItem for UIScrollView {}

#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIFocusEnvironment for UIScrollView {}

#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIFocusItem for UIScrollView {}

#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIFocusItemContainer for UIScrollView {}

#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
unsafe impl UIFocusItemScrollableContainer for UIScrollView {}

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
unsafe impl UIResponderStandardEditActions for UIScrollView {}

#[cfg(all(
    feature = "UIResponder",
    feature = "UITraitCollection",
    feature = "UIView"
))]
unsafe impl UITraitEnvironment for UIScrollView {}

extern_methods!(
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl UIScrollView {
        #[method(contentOffset)]
        pub unsafe fn contentOffset(&self) -> CGPoint;

        #[method(setContentOffset:)]
        pub unsafe fn setContentOffset(&self, content_offset: CGPoint);

        #[method(contentSize)]
        pub unsafe fn contentSize(&self) -> CGSize;

        #[method(setContentSize:)]
        pub unsafe fn setContentSize(&self, content_size: CGSize);

        #[cfg(feature = "UIGeometry")]
        #[method(contentInset)]
        pub unsafe fn contentInset(&self) -> UIEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setContentInset:)]
        pub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets);

        #[method(contentAlignmentPoint)]
        pub unsafe fn contentAlignmentPoint(&self) -> CGPoint;

        #[method(setContentAlignmentPoint:)]
        pub unsafe fn setContentAlignmentPoint(&self, content_alignment_point: CGPoint);

        #[cfg(feature = "UIGeometry")]
        #[method(adjustedContentInset)]
        pub unsafe fn adjustedContentInset(&self) -> UIEdgeInsets;

        #[method(adjustedContentInsetDidChange)]
        pub unsafe fn adjustedContentInsetDidChange(&self);

        #[method(contentInsetAdjustmentBehavior)]
        pub unsafe fn contentInsetAdjustmentBehavior(
            &self,
        ) -> UIScrollViewContentInsetAdjustmentBehavior;

        #[method(setContentInsetAdjustmentBehavior:)]
        pub unsafe fn setContentInsetAdjustmentBehavior(
            &self,
            content_inset_adjustment_behavior: UIScrollViewContentInsetAdjustmentBehavior,
        );

        #[method(automaticallyAdjustsScrollIndicatorInsets)]
        pub unsafe fn automaticallyAdjustsScrollIndicatorInsets(&self) -> bool;

        #[method(setAutomaticallyAdjustsScrollIndicatorInsets:)]
        pub unsafe fn setAutomaticallyAdjustsScrollIndicatorInsets(
            &self,
            automatically_adjusts_scroll_indicator_insets: bool,
        );

        #[cfg(feature = "UILayoutGuide")]
        #[method_id(@__retain_semantics Other contentLayoutGuide)]
        pub unsafe fn contentLayoutGuide(&self) -> Retained<UILayoutGuide>;

        #[cfg(feature = "UILayoutGuide")]
        #[method_id(@__retain_semantics Other frameLayoutGuide)]
        pub unsafe fn frameLayoutGuide(&self) -> Retained<UILayoutGuide>;

        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(&self)
            -> Option<Retained<ProtocolObject<dyn UIScrollViewDelegate>>>;

        #[method(setDelegate:)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn UIScrollViewDelegate>>,
        );

        #[method(isDirectionalLockEnabled)]
        pub unsafe fn isDirectionalLockEnabled(&self) -> bool;

        #[method(setDirectionalLockEnabled:)]
        pub unsafe fn setDirectionalLockEnabled(&self, directional_lock_enabled: bool);

        #[method(bounces)]
        pub unsafe fn bounces(&self) -> bool;

        #[method(setBounces:)]
        pub unsafe fn setBounces(&self, bounces: bool);

        #[method(bouncesHorizontally)]
        pub unsafe fn bouncesHorizontally(&self) -> bool;

        #[method(setBouncesHorizontally:)]
        pub unsafe fn setBouncesHorizontally(&self, bounces_horizontally: bool);

        #[method(bouncesVertically)]
        pub unsafe fn bouncesVertically(&self) -> bool;

        #[method(setBouncesVertically:)]
        pub unsafe fn setBouncesVertically(&self, bounces_vertically: bool);

        #[method(alwaysBounceVertical)]
        pub unsafe fn alwaysBounceVertical(&self) -> bool;

        #[method(setAlwaysBounceVertical:)]
        pub unsafe fn setAlwaysBounceVertical(&self, always_bounce_vertical: bool);

        #[method(alwaysBounceHorizontal)]
        pub unsafe fn alwaysBounceHorizontal(&self) -> bool;

        #[method(setAlwaysBounceHorizontal:)]
        pub unsafe fn setAlwaysBounceHorizontal(&self, always_bounce_horizontal: bool);

        #[method(isPagingEnabled)]
        pub unsafe fn isPagingEnabled(&self) -> bool;

        #[method(setPagingEnabled:)]
        pub unsafe fn setPagingEnabled(&self, paging_enabled: bool);

        #[method(isScrollEnabled)]
        pub unsafe fn isScrollEnabled(&self) -> bool;

        #[method(setScrollEnabled:)]
        pub unsafe fn setScrollEnabled(&self, scroll_enabled: bool);

        #[method(transfersHorizontalScrollingToParent)]
        pub unsafe fn transfersHorizontalScrollingToParent(&self) -> bool;

        #[method(setTransfersHorizontalScrollingToParent:)]
        pub unsafe fn setTransfersHorizontalScrollingToParent(
            &self,
            transfers_horizontal_scrolling_to_parent: bool,
        );

        #[method(transfersVerticalScrollingToParent)]
        pub unsafe fn transfersVerticalScrollingToParent(&self) -> bool;

        #[method(setTransfersVerticalScrollingToParent:)]
        pub unsafe fn setTransfersVerticalScrollingToParent(
            &self,
            transfers_vertical_scrolling_to_parent: bool,
        );

        #[method(showsVerticalScrollIndicator)]
        pub unsafe fn showsVerticalScrollIndicator(&self) -> bool;

        #[method(setShowsVerticalScrollIndicator:)]
        pub unsafe fn setShowsVerticalScrollIndicator(&self, shows_vertical_scroll_indicator: bool);

        #[method(showsHorizontalScrollIndicator)]
        pub unsafe fn showsHorizontalScrollIndicator(&self) -> bool;

        #[method(setShowsHorizontalScrollIndicator:)]
        pub unsafe fn setShowsHorizontalScrollIndicator(
            &self,
            shows_horizontal_scroll_indicator: bool,
        );

        #[method(indicatorStyle)]
        pub unsafe fn indicatorStyle(&self) -> UIScrollViewIndicatorStyle;

        #[method(setIndicatorStyle:)]
        pub unsafe fn setIndicatorStyle(&self, indicator_style: UIScrollViewIndicatorStyle);

        #[cfg(feature = "UIGeometry")]
        #[method(verticalScrollIndicatorInsets)]
        pub unsafe fn verticalScrollIndicatorInsets(&self) -> UIEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setVerticalScrollIndicatorInsets:)]
        pub unsafe fn setVerticalScrollIndicatorInsets(
            &self,
            vertical_scroll_indicator_insets: UIEdgeInsets,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(horizontalScrollIndicatorInsets)]
        pub unsafe fn horizontalScrollIndicatorInsets(&self) -> UIEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setHorizontalScrollIndicatorInsets:)]
        pub unsafe fn setHorizontalScrollIndicatorInsets(
            &self,
            horizontal_scroll_indicator_insets: UIEdgeInsets,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(scrollIndicatorInsets)]
        pub unsafe fn scrollIndicatorInsets(&self) -> UIEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setScrollIndicatorInsets:)]
        pub unsafe fn setScrollIndicatorInsets(&self, scroll_indicator_insets: UIEdgeInsets);

        #[method(decelerationRate)]
        pub unsafe fn decelerationRate(&self) -> UIScrollViewDecelerationRate;

        #[method(setDecelerationRate:)]
        pub unsafe fn setDecelerationRate(&self, deceleration_rate: UIScrollViewDecelerationRate);

        #[method(indexDisplayMode)]
        pub unsafe fn indexDisplayMode(&self) -> UIScrollViewIndexDisplayMode;

        #[method(setIndexDisplayMode:)]
        pub unsafe fn setIndexDisplayMode(&self, index_display_mode: UIScrollViewIndexDisplayMode);

        #[method(setContentOffset:animated:)]
        pub unsafe fn setContentOffset_animated(&self, content_offset: CGPoint, animated: bool);

        #[method(scrollRectToVisible:animated:)]
        pub unsafe fn scrollRectToVisible_animated(&self, rect: CGRect, animated: bool);

        #[method(flashScrollIndicators)]
        pub unsafe fn flashScrollIndicators(&self);

        #[cfg(feature = "block2")]
        #[method(withScrollIndicatorsShownForContentOffsetChanges:)]
        pub unsafe fn withScrollIndicatorsShownForContentOffsetChanges(
            &self,
            changes: &block2::Block<dyn Fn() + '_>,
        );

        #[method(isTracking)]
        pub unsafe fn isTracking(&self) -> bool;

        #[method(isDragging)]
        pub unsafe fn isDragging(&self) -> bool;

        #[method(isDecelerating)]
        pub unsafe fn isDecelerating(&self) -> bool;

        #[method(isScrollAnimating)]
        pub unsafe fn isScrollAnimating(&self) -> bool;

        #[method(delaysContentTouches)]
        pub unsafe fn delaysContentTouches(&self) -> bool;

        #[method(setDelaysContentTouches:)]
        pub unsafe fn setDelaysContentTouches(&self, delays_content_touches: bool);

        #[method(canCancelContentTouches)]
        pub unsafe fn canCancelContentTouches(&self) -> bool;

        #[method(setCanCancelContentTouches:)]
        pub unsafe fn setCanCancelContentTouches(&self, can_cancel_content_touches: bool);

        #[cfg(all(feature = "UIEvent", feature = "UITouch"))]
        #[method(touchesShouldBegin:withEvent:inContentView:)]
        pub unsafe fn touchesShouldBegin_withEvent_inContentView(
            &self,
            touches: &NSSet<UITouch>,
            event: Option<&UIEvent>,
            view: &UIView,
        ) -> bool;

        #[method(touchesShouldCancelInContentView:)]
        pub unsafe fn touchesShouldCancelInContentView(&self, view: &UIView) -> bool;

        #[method(minimumZoomScale)]
        pub unsafe fn minimumZoomScale(&self) -> CGFloat;

        #[method(setMinimumZoomScale:)]
        pub unsafe fn setMinimumZoomScale(&self, minimum_zoom_scale: CGFloat);

        #[method(maximumZoomScale)]
        pub unsafe fn maximumZoomScale(&self) -> CGFloat;

        #[method(setMaximumZoomScale:)]
        pub unsafe fn setMaximumZoomScale(&self, maximum_zoom_scale: CGFloat);

        #[method(zoomScale)]
        pub unsafe fn zoomScale(&self) -> CGFloat;

        #[method(setZoomScale:)]
        pub unsafe fn setZoomScale(&self, zoom_scale: CGFloat);

        #[method(setZoomScale:animated:)]
        pub unsafe fn setZoomScale_animated(&self, scale: CGFloat, animated: bool);

        #[method(zoomToRect:animated:)]
        pub unsafe fn zoomToRect_animated(&self, rect: CGRect, animated: bool);

        #[method(bouncesZoom)]
        pub unsafe fn bouncesZoom(&self) -> bool;

        #[method(setBouncesZoom:)]
        pub unsafe fn setBouncesZoom(&self, bounces_zoom: bool);

        #[method(isZooming)]
        pub unsafe fn isZooming(&self) -> bool;

        #[method(isZoomBouncing)]
        pub unsafe fn isZoomBouncing(&self) -> bool;

        #[method(isZoomAnimating)]
        pub unsafe fn isZoomAnimating(&self) -> bool;

        #[method(scrollsToTop)]
        pub unsafe fn scrollsToTop(&self) -> bool;

        #[method(setScrollsToTop:)]
        pub unsafe fn setScrollsToTop(&self, scrolls_to_top: bool);

        #[method(stopScrollingAndZooming)]
        pub unsafe fn stopScrollingAndZooming(&self);

        #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPanGestureRecognizer"))]
        #[method_id(@__retain_semantics Other panGestureRecognizer)]
        pub unsafe fn panGestureRecognizer(&self) -> Retained<UIPanGestureRecognizer>;

        #[cfg(all(feature = "UIGestureRecognizer", feature = "UIPinchGestureRecognizer"))]
        #[method_id(@__retain_semantics Other pinchGestureRecognizer)]
        pub unsafe fn pinchGestureRecognizer(&self) -> Option<Retained<UIPinchGestureRecognizer>>;

        #[cfg(feature = "UIGestureRecognizer")]
        #[deprecated = "Configuring the panGestureRecognizer for indirect scrolling automatically supports directional presses now, so this property is no longer useful."]
        #[method_id(@__retain_semantics Other directionalPressGestureRecognizer)]
        pub unsafe fn directionalPressGestureRecognizer(&self) -> Retained<UIGestureRecognizer>;

        #[method(keyboardDismissMode)]
        pub unsafe fn keyboardDismissMode(&self) -> UIScrollViewKeyboardDismissMode;

        #[method(setKeyboardDismissMode:)]
        pub unsafe fn setKeyboardDismissMode(
            &self,
            keyboard_dismiss_mode: UIScrollViewKeyboardDismissMode,
        );

        #[cfg(all(feature = "UIControl", feature = "UIRefreshControl"))]
        #[method_id(@__retain_semantics Other refreshControl)]
        pub unsafe fn refreshControl(&self) -> Option<Retained<UIRefreshControl>>;

        #[cfg(all(feature = "UIControl", feature = "UIRefreshControl"))]
        #[method(setRefreshControl:)]
        pub unsafe fn setRefreshControl(&self, refresh_control: Option<&UIRefreshControl>);

        #[method(allowsKeyboardScrolling)]
        pub unsafe fn allowsKeyboardScrolling(&self) -> bool;

        #[method(setAllowsKeyboardScrolling:)]
        pub unsafe fn setAllowsKeyboardScrolling(&self, allows_keyboard_scrolling: bool);
    }
);

extern_methods!(
    /// Methods declared on superclass `UIView`
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl UIScrollView {
        #[method_id(@__retain_semantics Init initWithFrame:)]
        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl UIScrollView {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern_protocol!(
    pub unsafe trait UIScrollViewDelegate: NSObjectProtocol + IsMainThreadOnly {
        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidScroll:)]
        unsafe fn scrollViewDidScroll(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidZoom:)]
        unsafe fn scrollViewDidZoom(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewWillBeginDragging:)]
        unsafe fn scrollViewWillBeginDragging(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewWillEndDragging:withVelocity:targetContentOffset:)]
        unsafe fn scrollViewWillEndDragging_withVelocity_targetContentOffset(
            &self,
            scroll_view: &UIScrollView,
            velocity: CGPoint,
            target_content_offset: NonNull<CGPoint>,
        );

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidEndDragging:willDecelerate:)]
        unsafe fn scrollViewDidEndDragging_willDecelerate(
            &self,
            scroll_view: &UIScrollView,
            decelerate: bool,
        );

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewWillBeginDecelerating:)]
        unsafe fn scrollViewWillBeginDecelerating(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidEndDecelerating:)]
        unsafe fn scrollViewDidEndDecelerating(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidEndScrollingAnimation:)]
        unsafe fn scrollViewDidEndScrollingAnimation(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method_id(@__retain_semantics Other viewForZoomingInScrollView:)]
        unsafe fn viewForZoomingInScrollView(
            &self,
            scroll_view: &UIScrollView,
        ) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewWillBeginZooming:withView:)]
        unsafe fn scrollViewWillBeginZooming_withView(
            &self,
            scroll_view: &UIScrollView,
            view: Option<&UIView>,
        );

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidEndZooming:withView:atScale:)]
        unsafe fn scrollViewDidEndZooming_withView_atScale(
            &self,
            scroll_view: &UIScrollView,
            view: Option<&UIView>,
            scale: CGFloat,
        );

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewShouldScrollToTop:)]
        unsafe fn scrollViewShouldScrollToTop(&self, scroll_view: &UIScrollView) -> bool;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidScrollToTop:)]
        unsafe fn scrollViewDidScrollToTop(&self, scroll_view: &UIScrollView);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method(scrollViewDidChangeAdjustedContentInset:)]
        unsafe fn scrollViewDidChangeAdjustedContentInset(&self, scroll_view: &UIScrollView);
    }

    unsafe impl ProtocolType for dyn UIScrollViewDelegate {}
);
