objc2_web_kit/generated/
WKContentRuleListStore.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct WKContentRuleListStore;
16);
17
18extern_conformance!(
19 unsafe impl NSObjectProtocol for WKContentRuleListStore {}
20);
21
22impl WKContentRuleListStore {
23 extern_methods!(
24 #[unsafe(method(defaultStore))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn defaultStore(mtm: MainThreadMarker) -> Option<Retained<Self>>;
27
28 #[unsafe(method(storeWithURL:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn storeWithURL(
31 url: Option<&NSURL>,
32 mtm: MainThreadMarker,
33 ) -> Option<Retained<Self>>;
34
35 #[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
36 #[unsafe(method(compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn compileContentRuleListForIdentifier_encodedContentRuleList_completionHandler(
39 &self,
40 identifier: Option<&NSString>,
41 encoded_content_rule_list: Option<&NSString>,
42 completion_handler: Option<
43 &block2::DynBlock<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
44 >,
45 );
46
47 #[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
48 #[unsafe(method(lookUpContentRuleListForIdentifier:completionHandler:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn lookUpContentRuleListForIdentifier_completionHandler(
51 &self,
52 identifier: Option<&NSString>,
53 completion_handler: Option<
54 &block2::DynBlock<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
55 >,
56 );
57
58 #[cfg(feature = "block2")]
59 #[unsafe(method(removeContentRuleListForIdentifier:completionHandler:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn removeContentRuleListForIdentifier_completionHandler(
62 &self,
63 identifier: Option<&NSString>,
64 completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
65 );
66
67 #[cfg(feature = "block2")]
68 #[unsafe(method(getAvailableContentRuleListIdentifiers:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn getAvailableContentRuleListIdentifiers(
71 &self,
72 completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSArray<NSString>)>>,
73 );
74 );
75}
76
77impl WKContentRuleListStore {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
87 );
88}