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:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn storeWithURL(
34 url: Option<&NSURL>,
35 mtm: MainThreadMarker,
36 ) -> Option<Retained<Self>>;
37
38 #[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
39 #[unsafe(method(compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn compileContentRuleListForIdentifier_encodedContentRuleList_completionHandler(
47 &self,
48 identifier: Option<&NSString>,
49 encoded_content_rule_list: Option<&NSString>,
50 completion_handler: Option<
51 &block2::DynBlock<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
52 >,
53 );
54
55 #[cfg(all(feature = "WKContentRuleList", feature = "block2"))]
56 #[unsafe(method(lookUpContentRuleListForIdentifier:completionHandler:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn lookUpContentRuleListForIdentifier_completionHandler(
63 &self,
64 identifier: Option<&NSString>,
65 completion_handler: Option<
66 &block2::DynBlock<dyn Fn(*mut WKContentRuleList, *mut NSError)>,
67 >,
68 );
69
70 #[cfg(feature = "block2")]
71 #[unsafe(method(removeContentRuleListForIdentifier:completionHandler:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn removeContentRuleListForIdentifier_completionHandler(
78 &self,
79 identifier: Option<&NSString>,
80 completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
81 );
82
83 #[cfg(feature = "block2")]
84 #[unsafe(method(getAvailableContentRuleListIdentifiers:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn getAvailableContentRuleListIdentifiers(
90 &self,
91 completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSArray<NSString>)>>,
92 );
93 );
94}
95
96impl WKContentRuleListStore {
98 extern_methods!(
99 #[unsafe(method(init))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
102
103 #[unsafe(method(new))]
104 #[unsafe(method_family = new)]
105 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
106 );
107}