objc2_web_kit/generated/
DOMCSSStyleSheet.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domcssstylesheet?language=objc)
12    #[unsafe(super(DOMStyleSheet, DOMObject, WebScriptObject, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(
15        feature = "DOMObject",
16        feature = "DOMStyleSheet",
17        feature = "WebScriptObject"
18    ))]
19    #[deprecated]
20    pub struct DOMCSSStyleSheet;
21);
22
23#[cfg(all(
24    feature = "DOMObject",
25    feature = "DOMStyleSheet",
26    feature = "WebScriptObject"
27))]
28extern_conformance!(
29    unsafe impl NSCopying for DOMCSSStyleSheet {}
30);
31
32#[cfg(all(
33    feature = "DOMObject",
34    feature = "DOMStyleSheet",
35    feature = "WebScriptObject"
36))]
37unsafe impl CopyingHelper for DOMCSSStyleSheet {
38    type Result = Self;
39}
40
41#[cfg(all(
42    feature = "DOMObject",
43    feature = "DOMStyleSheet",
44    feature = "WebScriptObject"
45))]
46extern_conformance!(
47    unsafe impl NSObjectProtocol for DOMCSSStyleSheet {}
48);
49
50#[cfg(all(
51    feature = "DOMObject",
52    feature = "DOMStyleSheet",
53    feature = "WebScriptObject"
54))]
55impl DOMCSSStyleSheet {
56    extern_methods!(
57        #[cfg(feature = "DOMCSSRule")]
58        #[deprecated]
59        #[unsafe(method(ownerRule))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn ownerRule(&self) -> Option<Retained<DOMCSSRule>>;
62
63        #[cfg(feature = "DOMCSSRuleList")]
64        #[deprecated]
65        #[unsafe(method(cssRules))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn cssRules(&self) -> Option<Retained<DOMCSSRuleList>>;
68
69        #[cfg(feature = "DOMCSSRuleList")]
70        #[unsafe(method(rules))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn rules(&self) -> Option<Retained<DOMCSSRuleList>>;
73
74        #[unsafe(method(insertRule:index:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn insertRule_index(&self, rule: Option<&NSString>, index: c_uint) -> c_uint;
77
78        #[deprecated]
79        #[unsafe(method(deleteRule:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn deleteRule(&self, index: c_uint);
82
83        #[unsafe(method(addRule:style:index:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn addRule_style_index(
86            &self,
87            selector: Option<&NSString>,
88            style: Option<&NSString>,
89            index: c_uint,
90        ) -> c_int;
91
92        #[unsafe(method(removeRule:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn removeRule(&self, index: c_uint);
95    );
96}
97
98/// Methods declared on superclass `DOMObject`.
99#[cfg(all(
100    feature = "DOMObject",
101    feature = "DOMStyleSheet",
102    feature = "WebScriptObject"
103))]
104impl DOMCSSStyleSheet {
105    extern_methods!(
106        #[deprecated]
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110    );
111}
112
113/// Methods declared on superclass `NSObject`.
114#[cfg(all(
115    feature = "DOMObject",
116    feature = "DOMStyleSheet",
117    feature = "WebScriptObject"
118))]
119impl DOMCSSStyleSheet {
120    extern_methods!(
121        #[unsafe(method(new))]
122        #[unsafe(method_family = new)]
123        pub unsafe fn new() -> Retained<Self>;
124    );
125}
126
127/// DOMCSSStyleSheetDeprecated.
128#[cfg(all(
129    feature = "DOMObject",
130    feature = "DOMStyleSheet",
131    feature = "WebScriptObject"
132))]
133impl DOMCSSStyleSheet {
134    extern_methods!(
135        #[deprecated]
136        #[unsafe(method(insertRule::))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn insertRule(&self, rule: Option<&NSString>, index: c_uint) -> c_uint;
139    );
140}