use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait SWCollaborationViewDelegate: NSObjectProtocol {
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(collaborationViewShouldPresentPopover:))]
#[unsafe(method_family = none)]
unsafe fn collaborationViewShouldPresentPopover(
&self,
collaboration_view: &SWCollaborationView,
) -> bool;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(collaborationViewWillPresentPopover:))]
#[unsafe(method_family = none)]
unsafe fn collaborationViewWillPresentPopover(
&self,
collaboration_view: &SWCollaborationView,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(collaborationViewDidDismissPopover:))]
#[unsafe(method_family = none)]
unsafe fn collaborationViewDidDismissPopover(
&self,
collaboration_view: &SWCollaborationView,
);
}
);
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct SWCollaborationView;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibility for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAppearanceCustomization for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSDraggingDestination for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for SWCollaborationView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl SWCollaborationView {
extern_methods!(
#[unsafe(method(cloudSharingDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn cloudSharingDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn NSCloudSharingServiceDelegate>>>;
#[unsafe(method(setCloudSharingDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setCloudSharingDelegate(
&self,
cloud_sharing_delegate: Option<&ProtocolObject<dyn NSCloudSharingServiceDelegate>>,
);
#[unsafe(method(setContentView:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentView(&self, detail_view_list_content_view: &NSView);
#[unsafe(method(initWithItemProvider:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithItemProvider(
this: Allocated<Self>,
item_provider: &NSItemProvider,
) -> Retained<Self>;
#[unsafe(method(activeParticipantCount))]
#[unsafe(method_family = none)]
pub unsafe fn activeParticipantCount(&self) -> NSUInteger;
#[unsafe(method(setActiveParticipantCount:))]
#[unsafe(method_family = none)]
pub unsafe fn setActiveParticipantCount(&self, active_participant_count: NSUInteger);
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn SWCollaborationViewDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn SWCollaborationViewDelegate>>,
);
#[unsafe(method(headerTitle))]
#[unsafe(method_family = none)]
pub unsafe fn headerTitle(&self) -> Retained<NSString>;
#[unsafe(method(setHeaderTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setHeaderTitle(&self, header_title: &NSString);
#[unsafe(method(headerSubtitle))]
#[unsafe(method_family = none)]
pub unsafe fn headerSubtitle(&self) -> Retained<NSString>;
#[unsafe(method(setHeaderSubtitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setHeaderSubtitle(&self, header_subtitle: &NSString);
#[unsafe(method(headerImage))]
#[unsafe(method_family = none)]
pub unsafe fn headerImage(&self) -> Retained<NSImage>;
#[unsafe(method(setHeaderImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setHeaderImage(&self, header_image: &NSImage);
#[unsafe(method(menuFormRepresentation))]
#[unsafe(method_family = none)]
pub unsafe fn menuFormRepresentation(&self) -> Retained<NSMenuItem>;
#[unsafe(method(cloudSharingServiceDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn cloudSharingServiceDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn NSCloudSharingServiceDelegate>>>;
#[unsafe(method(setCloudSharingServiceDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setCloudSharingServiceDelegate(
&self,
cloud_sharing_service_delegate: Option<
&ProtocolObject<dyn NSCloudSharingServiceDelegate>,
>,
);
#[cfg(feature = "block2")]
#[unsafe(method(dismissPopover:))]
#[unsafe(method_family = none)]
pub unsafe fn dismissPopover(&self, completion: Option<&block2::DynBlock<dyn Fn()>>);
#[unsafe(method(manageButtonTitle))]
#[unsafe(method_family = none)]
pub unsafe fn manageButtonTitle(&self) -> Retained<NSString>;
#[unsafe(method(setManageButtonTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setManageButtonTitle(&self, manage_button_title: &NSString);
#[unsafe(method(setShowManageButton:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowManageButton(&self, show_manage_button: bool);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl SWCollaborationView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl SWCollaborationView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl SWCollaborationView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}