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))]
28unsafe impl NSCopying for DOMCSSStyleSheet {}
29
30#[cfg(all(
31    feature = "DOMObject",
32    feature = "DOMStyleSheet",
33    feature = "WebScriptObject"
34))]
35unsafe impl CopyingHelper for DOMCSSStyleSheet {
36    type Result = Self;
37}
38
39#[cfg(all(
40    feature = "DOMObject",
41    feature = "DOMStyleSheet",
42    feature = "WebScriptObject"
43))]
44unsafe impl NSObjectProtocol for DOMCSSStyleSheet {}
45
46#[cfg(all(
47    feature = "DOMObject",
48    feature = "DOMStyleSheet",
49    feature = "WebScriptObject"
50))]
51impl DOMCSSStyleSheet {
52    extern_methods!(
53        #[cfg(feature = "DOMCSSRule")]
54        #[deprecated]
55        #[unsafe(method(ownerRule))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn ownerRule(&self) -> Option<Retained<DOMCSSRule>>;
58
59        #[cfg(feature = "DOMCSSRuleList")]
60        #[deprecated]
61        #[unsafe(method(cssRules))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn cssRules(&self) -> Option<Retained<DOMCSSRuleList>>;
64
65        #[cfg(feature = "DOMCSSRuleList")]
66        #[unsafe(method(rules))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn rules(&self) -> Option<Retained<DOMCSSRuleList>>;
69
70        #[unsafe(method(insertRule:index:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn insertRule_index(&self, rule: Option<&NSString>, index: c_uint) -> c_uint;
73
74        #[deprecated]
75        #[unsafe(method(deleteRule:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn deleteRule(&self, index: c_uint);
78
79        #[unsafe(method(addRule:style:index:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn addRule_style_index(
82            &self,
83            selector: Option<&NSString>,
84            style: Option<&NSString>,
85            index: c_uint,
86        ) -> c_int;
87
88        #[unsafe(method(removeRule:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn removeRule(&self, index: c_uint);
91    );
92}
93
94/// Methods declared on superclass `DOMObject`.
95#[cfg(all(
96    feature = "DOMObject",
97    feature = "DOMStyleSheet",
98    feature = "WebScriptObject"
99))]
100impl DOMCSSStyleSheet {
101    extern_methods!(
102        #[deprecated]
103        #[unsafe(method(init))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106    );
107}
108
109/// Methods declared on superclass `NSObject`.
110#[cfg(all(
111    feature = "DOMObject",
112    feature = "DOMStyleSheet",
113    feature = "WebScriptObject"
114))]
115impl DOMCSSStyleSheet {
116    extern_methods!(
117        #[unsafe(method(new))]
118        #[unsafe(method_family = new)]
119        pub unsafe fn new() -> Retained<Self>;
120    );
121}
122
123/// DOMCSSStyleSheetDeprecated.
124#[cfg(all(
125    feature = "DOMObject",
126    feature = "DOMStyleSheet",
127    feature = "WebScriptObject"
128))]
129impl DOMCSSStyleSheet {
130    extern_methods!(
131        #[deprecated]
132        #[unsafe(method(insertRule::))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn insertRule(&self, rule: Option<&NSString>, index: c_uint) -> c_uint;
135    );
136}