Cordova Windows 的本机(C#、C++)UI 插件?
Native (C#, C++) UI plugins for Cordova Windows?
对于 Cordova iOS 和 Cordova Android 可以创建在您的应用程序之上创建本机 UI 的插件 - 您只需在插件中包含库并执行它们API。 Example for Android InAppBrowser.
对于 Cordova Windows,本机代码 是 HTML 和 Javascript,因此 InAppBrowser 插件也是 adds a standard HTML tag for a Webview (or even plain Iframe) to get the same effect。
但您也可以通过 Windows 运行时组件为使用 C# 或 C++ 本机代码的 Cordova Windows 创建插件。 public 示例是 globalization plugin that uses a .winmd
file to offer APIs to the Javascript code (source code for this)。这很好用,非常棒。
不幸的是,我能找到的所有插件都使用此 C#/C++ 本机插件机制,仅用于接收一些方法调用、使用参数和 return 一些数据。 None 个打开任何 windows 或创建任何其他 GUI(例如,可能由外部 C# SDK 提供)。
如何为 Cordova Windows 创建一个使用本机(C#、C++)代码创建用户界面的插件?这可能吗?
得到一个 response in a Apache Cordova mailing list 我正在这里复制:
Unfortunately, No. C#/C++ Portable Class Library ( PCL ) code cannot
render on top of the web component.
The libraries that you can use are limited in PCLs and for projects
targeting Windows Store it is not possible to render UI.
If the entire cordova-windows platform were re-architected to be a C# or
C++ based application, with a native webview container in which to render,
then everything is possible. This is a long risky road though ...
everything from the cordova.js and the bridge would have to change, and
every plugin would need to be rewritten.
对于 Cordova iOS 和 Cordova Android 可以创建在您的应用程序之上创建本机 UI 的插件 - 您只需在插件中包含库并执行它们API。 Example for Android InAppBrowser.
对于 Cordova Windows,本机代码 是 HTML 和 Javascript,因此 InAppBrowser 插件也是 adds a standard HTML tag for a Webview (or even plain Iframe) to get the same effect。
但您也可以通过 Windows 运行时组件为使用 C# 或 C++ 本机代码的 Cordova Windows 创建插件。 public 示例是 globalization plugin that uses a .winmd
file to offer APIs to the Javascript code (source code for this)。这很好用,非常棒。
不幸的是,我能找到的所有插件都使用此 C#/C++ 本机插件机制,仅用于接收一些方法调用、使用参数和 return 一些数据。 None 个打开任何 windows 或创建任何其他 GUI(例如,可能由外部 C# SDK 提供)。
如何为 Cordova Windows 创建一个使用本机(C#、C++)代码创建用户界面的插件?这可能吗?
得到一个 response in a Apache Cordova mailing list 我正在这里复制:
Unfortunately, No. C#/C++ Portable Class Library ( PCL ) code cannot render on top of the web component. The libraries that you can use are limited in PCLs and for projects targeting Windows Store it is not possible to render UI.
If the entire cordova-windows platform were re-architected to be a C# or C++ based application, with a native webview container in which to render, then everything is possible. This is a long risky road though ... everything from the cordova.js and the bridge would have to change, and every plugin would need to be rewritten.