File tree Expand file tree Collapse file tree
crates/iron-remote-desktop/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,20 @@ pub trait ClipboardData {
44 type Item : ClipboardItem ;
55
66 fn create ( ) -> Self ;
7+
78 fn add_text ( & mut self , mime_type : & str , text : & str ) ;
9+
810 fn add_binary ( & mut self , mime_type : & str , binary : & [ u8 ] ) ;
11+
912 fn items ( & self ) -> & [ Self :: Item ] ;
13+
14+ fn is_empty ( & self ) -> bool {
15+ self . items ( ) . is_empty ( )
16+ }
1017}
1118
1219pub trait ClipboardItem {
1320 fn mime_type ( & self ) -> & str ;
21+
1422 fn value ( & self ) -> impl Into < JsValue > ;
1523}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use wasm_bindgen::prelude::*;
22
33pub trait IronError {
44 fn backtrace ( & self ) -> String ;
5+
56 fn kind ( & self ) -> IronErrorKind ;
67}
78
Original file line number Diff line number Diff line change 11pub trait DeviceEvent {
22 fn mouse_button_pressed ( button : u8 ) -> Self ;
3+
34 fn mouse_button_released ( button : u8 ) -> Self ;
5+
46 fn mouse_move ( x : u16 , y : u16 ) -> Self ;
7+
58 fn wheel_rotations ( vertical : bool , rotation_units : i16 ) -> Self ;
9+
610 fn key_pressed ( scancode : u16 ) -> Self ;
11+
712 fn key_released ( scancode : u16 ) -> Self ;
13+
814 fn unicode_pressed ( unicode : char ) -> Self ;
15+
916 fn unicode_released ( unicode : char ) -> Self ;
1017}
1118
1219pub trait InputTransaction {
1320 type DeviceEvent : DeviceEvent ;
1421
1522 fn create ( ) -> Self ;
23+
1624 fn add_event ( & mut self , event : Self :: DeviceEvent ) ;
1725}
You can’t perform that action at this time.
0 commit comments