xterm_js_rs/sugar/
constructor.rs1use crate::{
2 BufferRange, FunctionIdentifier, Link, LinkDecorations, LinkMatcherOptions, LinkProvider,
3 Terminal, TerminalOptions, Theme, UnicodeVersionProvider, WindowOptions,
4};
5use wasm_bindgen::JsCast;
6
7impl Terminal {
8 pub fn new(options: &TerminalOptions) -> Self {
9 Terminal::construct(Some(&options))
10 }
11}
12
13impl Default for Terminal {
14 fn default() -> Self {
15 Terminal::construct(None)
16 }
17}
18
19impl TerminalOptions {
20 pub fn new() -> Self {
21 js_sys::Object::new().unchecked_into()
22 }
23}
24
25impl Theme {
26 pub fn new() -> Self {
27 js_sys::Object::new().unchecked_into()
28 }
29}
30
31impl LinkMatcherOptions {
32 pub fn new() -> Self {
33 js_sys::Object::new().unchecked_into()
34 }
35}
36
37impl WindowOptions {
38 pub fn new() -> Self {
39 js_sys::Object::new().unchecked_into()
40 }
41}
42
43impl LinkProvider {
44 pub fn new() -> Self {
45 js_sys::Object::new().unchecked_into()
46 }
47}
48
49impl Link {
50 pub fn new() -> Self {
51 js_sys::Object::new().unchecked_into()
52 }
53}
54
55impl LinkDecorations {
56 pub fn new() -> Self {
57 js_sys::Object::new().unchecked_into()
58 }
59}
60
61impl BufferRange {
62 pub fn new() -> Self {
63 js_sys::Object::new().unchecked_into()
64 }
65}
66
67impl FunctionIdentifier {
68 pub fn new() -> Self {
69 js_sys::Object::new().unchecked_into()
70 }
71}
72
73impl UnicodeVersionProvider {
74 pub fn new() -> Self {
75 js_sys::Object::new().unchecked_into()
76 }
77}