use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WKContentRuleListStore;
);
unsafe impl NSObjectProtocol for WKContentRuleListStore {}
impl WKContentRuleListStore {
extern_methods!(
#[unsafe(method(defaultStore))]
#[unsafe(method_family = none)]
pub unsafe fn defaultStore(mtm: MainThreadMarker) -> Option<Retained<Self>>;
#[unsafe(method(storeWithURL:))]
#[unsafe(method_family = none)]
pub unsafe fn storeWithURL(
url: Option<&NSURL>,
mtm: MainThreadMarker,
) -> Option<Retained<Self>>;
#[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
#[unsafe(method(compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn compileContentRuleListForIdentifier_encodedContentRuleList_completionHandler(
&self,
identifier: Option<&NSString>,
encoded_content_rule_list: Option<&NSString>,
completion_handler: Option<
&block2::Block<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
>,
);
#[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
#[unsafe(method(lookUpContentRuleListForIdentifier:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn lookUpContentRuleListForIdentifier_completionHandler(
&self,
identifier: Option<&NSString>,
completion_handler: Option<
&block2::Block<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
>,
);
#[cfg(feature = "block2")]
#[unsafe(method(removeContentRuleListForIdentifier:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn removeContentRuleListForIdentifier_completionHandler(
&self,
identifier: Option<&NSString>,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
#[unsafe(method(getAvailableContentRuleListIdentifiers:))]
#[unsafe(method_family = none)]
pub unsafe fn getAvailableContentRuleListIdentifiers(
&self,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSArray<NSString>)>>,
);
);
}
impl WKContentRuleListStore {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}