objc2_web_kit/generated/
DOMHTMLOptionsCollection.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(DOMObject, WebScriptObject, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
15 #[deprecated]
16 pub struct DOMHTMLOptionsCollection;
17);
18
19#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
20unsafe impl NSCopying for DOMHTMLOptionsCollection {}
21
22#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
23unsafe impl CopyingHelper for DOMHTMLOptionsCollection {
24 type Result = Self;
25}
26
27#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
28unsafe impl NSObjectProtocol for DOMHTMLOptionsCollection {}
29
30#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
31impl DOMHTMLOptionsCollection {
32 extern_methods!(
33 #[unsafe(method(selectedIndex))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn selectedIndex(&self) -> c_int;
36
37 #[unsafe(method(setSelectedIndex:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn setSelectedIndex(&self, selected_index: c_int);
41
42 #[deprecated]
43 #[unsafe(method(length))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn length(&self) -> c_uint;
46
47 #[deprecated]
49 #[unsafe(method(setLength:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setLength(&self, length: c_uint);
52
53 #[cfg(feature = "DOMNode")]
54 #[deprecated]
55 #[unsafe(method(namedItem:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn namedItem(&self, name: Option<&NSString>) -> Option<Retained<DOMNode>>;
58
59 #[cfg(all(
60 feature = "DOMElement",
61 feature = "DOMHTMLElement",
62 feature = "DOMHTMLOptionElement",
63 feature = "DOMNode"
64 ))]
65 #[unsafe(method(add:index:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn add_index(&self, option: Option<&DOMHTMLOptionElement>, index: c_uint);
68
69 #[unsafe(method(remove:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn remove(&self, index: c_uint);
72
73 #[cfg(feature = "DOMNode")]
74 #[deprecated]
75 #[unsafe(method(item:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn item(&self, index: c_uint) -> Option<Retained<DOMNode>>;
78 );
79}
80
81#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
83impl DOMHTMLOptionsCollection {
84 extern_methods!(
85 #[deprecated]
86 #[unsafe(method(init))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89 );
90}
91
92#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
94impl DOMHTMLOptionsCollection {
95 extern_methods!(
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new() -> Retained<Self>;
99 );
100}