mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-03 11:29:25 +08:00
32 lines
753 B
Dart
32 lines
753 B
Dart
import 'dart:typed_data';
|
|
import 'dart:js' as js;
|
|
import 'common.dart';
|
|
|
|
class PlatformFFI {
|
|
static void clearRgbaFrame() {}
|
|
|
|
static Uint8List getRgba() {
|
|
return js.context.callMethod('getRgba');
|
|
}
|
|
|
|
static Future<String> getVersion() async {
|
|
return getByName('version');
|
|
}
|
|
|
|
static String getByName(String name, [String arg = '']) {
|
|
return js.context.callMethod('getByName', [name, arg]);
|
|
}
|
|
|
|
static void setByName(String name, [String value = '']) {
|
|
js.context.callMethod('setByName', [name, value]);
|
|
}
|
|
|
|
static Future<Null> init() async {
|
|
isWeb = true;
|
|
isDesktop = !js.context.callMethod('isMobile');
|
|
js.context.callMethod('init');
|
|
}
|
|
}
|
|
|
|
final localeName = js.context.callMethod('getLanguage') as String;
|