File tree Expand file tree Collapse file tree 5 files changed +131
-59
lines changed
crates/iron-remote-desktop/src Expand file tree Collapse file tree 5 files changed +131
-59
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,20 @@ pub trait ClipboardData {
4
4
type Item : ClipboardItem ;
5
5
6
6
fn create ( ) -> Self ;
7
+
7
8
fn add_text ( & mut self , mime_type : & str , text : & str ) ;
9
+
8
10
fn add_binary ( & mut self , mime_type : & str , binary : & [ u8 ] ) ;
11
+
9
12
fn items ( & self ) -> & [ Self :: Item ] ;
13
+
14
+ fn is_empty ( & self ) -> bool {
15
+ self . items ( ) . is_empty ( )
16
+ }
10
17
}
11
18
12
19
pub trait ClipboardItem {
13
20
fn mime_type ( & self ) -> & str ;
21
+
14
22
fn value ( & self ) -> impl Into < JsValue > ;
15
23
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use wasm_bindgen::prelude::*;
2
2
3
3
pub trait IronError {
4
4
fn backtrace ( & self ) -> String ;
5
+
5
6
fn kind ( & self ) -> IronErrorKind ;
6
7
}
7
8
Original file line number Diff line number Diff line change 1
1
pub trait DeviceEvent {
2
2
fn mouse_button_pressed ( button : u8 ) -> Self ;
3
+
3
4
fn mouse_button_released ( button : u8 ) -> Self ;
5
+
4
6
fn mouse_move ( x : u16 , y : u16 ) -> Self ;
7
+
5
8
fn wheel_rotations ( vertical : bool , rotation_units : i16 ) -> Self ;
9
+
6
10
fn key_pressed ( scancode : u16 ) -> Self ;
11
+
7
12
fn key_released ( scancode : u16 ) -> Self ;
13
+
8
14
fn unicode_pressed ( unicode : char ) -> Self ;
15
+
9
16
fn unicode_released ( unicode : char ) -> Self ;
10
17
}
11
18
12
19
pub trait InputTransaction {
13
20
type DeviceEvent : DeviceEvent ;
14
21
15
22
fn create ( ) -> Self ;
23
+
16
24
fn add_event ( & mut self , event : Self :: DeviceEvent ) ;
17
25
}
You can’t perform that action at this time.
0 commit comments