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"))]
20extern_conformance!(
21 unsafe impl NSCopying for DOMHTMLOptionsCollection {}
22);
23
24#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
25unsafe impl CopyingHelper for DOMHTMLOptionsCollection {
26 type Result = Self;
27}
28
29#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
30extern_conformance!(
31 unsafe impl NSObjectProtocol for DOMHTMLOptionsCollection {}
32);
33
34#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
35impl DOMHTMLOptionsCollection {
36 extern_methods!(
37 #[unsafe(method(selectedIndex))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn selectedIndex(&self) -> c_int;
40
41 #[unsafe(method(setSelectedIndex:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setSelectedIndex(&self, selected_index: c_int);
45
46 #[deprecated]
47 #[unsafe(method(length))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn length(&self) -> c_uint;
50
51 #[deprecated]
53 #[unsafe(method(setLength:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn setLength(&self, length: c_uint);
56
57 #[cfg(feature = "DOMNode")]
58 #[deprecated]
59 #[unsafe(method(namedItem:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn namedItem(&self, name: Option<&NSString>) -> Option<Retained<DOMNode>>;
62
63 #[cfg(all(
64 feature = "DOMElement",
65 feature = "DOMHTMLElement",
66 feature = "DOMHTMLOptionElement",
67 feature = "DOMNode"
68 ))]
69 #[unsafe(method(add:index:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn add_index(&self, option: Option<&DOMHTMLOptionElement>, index: c_uint);
72
73 #[unsafe(method(remove:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn remove(&self, index: c_uint);
76
77 #[cfg(feature = "DOMNode")]
78 #[deprecated]
79 #[unsafe(method(item:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn item(&self, index: c_uint) -> Option<Retained<DOMNode>>;
82 );
83}
84
85#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
87impl DOMHTMLOptionsCollection {
88 extern_methods!(
89 #[deprecated]
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93 );
94}
95
96#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
98impl DOMHTMLOptionsCollection {
99 extern_methods!(
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub unsafe fn new() -> Retained<Self>;
103 );
104}