您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
65 行
2.0 KiB
65 行
2.0 KiB
var UIWidgetsLibrary = {
|
|
|
|
|
|
//$method_support__postset: 'method_support.init1();method_support.init2();',
|
|
//$method_support: {
|
|
|
|
//},
|
|
$UIWidgetsPlugin: {
|
|
textInput: null,
|
|
messageManager: null,
|
|
|
|
getTextInput: function() {
|
|
if (UIWidgetsPlugin.textInput) {
|
|
return UIWidgetsPlugin.textInput;
|
|
}
|
|
|
|
UIWidgetsPlugin.textInput = new UIWidgetsTextInputPlugin({
|
|
messageManager: UIWidgetsPlugin.getMessageManager(),
|
|
canvas: Module.canvas
|
|
});
|
|
return UIWidgetsPlugin.textInput;
|
|
},
|
|
|
|
getMessageManager: function() {
|
|
if (UIWidgetsPlugin.messageManager) {
|
|
return UIWidgetsPlugin.messageManager;
|
|
}
|
|
|
|
UIWidgetsPlugin.messageManager = new UIWidgetsMessageManager(SendMessage);
|
|
return UIWidgetsPlugin.messageManager;
|
|
},
|
|
|
|
messageObjectName: ""
|
|
},
|
|
|
|
UIWidgetsWebGLDevicePixelRatio: function () {
|
|
return window.devicePixelRatio || 1;
|
|
},
|
|
|
|
|
|
UIWidgetsTextInputSetClient: function (client, configuration) {
|
|
UIWidgetsPlugin.getTextInput().setClient(client, Pointer_stringify(configuration));
|
|
},
|
|
|
|
UIWidgetsTextInputSetTextInputEditingState: function (jsonText) {
|
|
UIWidgetsPlugin.getTextInput().setTextInputEditingState(Pointer_stringify(jsonText));
|
|
},
|
|
|
|
UIWidgetsTextInputSetIMEPos: function(x, y) {
|
|
UIWidgetsPlugin.getTextInput().setTextInputIMEPos(x, y);
|
|
},
|
|
|
|
UIWidgetsTextInputClearTextInputClient: function () {
|
|
UIWidgetsPlugin.getTextInput().clearTextInputClient();
|
|
},
|
|
|
|
UIWidgetsMessageSetObjectName: function (name) {
|
|
UIWidgetsPlugin.getMessageManager().setObjectName(Pointer_stringify(name));
|
|
}
|
|
};
|
|
|
|
autoAddDeps(UIWidgetsLibrary, '$UIWidgetsPlugin');
|
|
autoAddDeps(UIWidgetsLibrary, '$UIWidgetsCanvasInputModule');
|
|
autoAddDeps(UIWidgetsLibrary, '$UIWidgetsInputPluginModule');
|
|
mergeInto(LibraryManager.library, UIWidgetsLibrary);
|