Examples 编辑

These examples demonstrate how to use js-ctypes.

General

Using C struct and pointers
An example on how to use basic C data types with js-ctypes.
Standard OS Libraries
Some examples on how to get cursor position on each OS.

Mac OS X

These examples require Mac OS X to operate.

Add Image to iPhoto
An extension that adds a contextual menu item to images that lets you easily add them to iPhoto on Mac OS X.
Using Objective-C from js-ctypes
An example how to use Objective-C from js-ctypes, by converting Objective-C code into C code.
Using COM from js-ctypes
An example how to use COM API of Windows systems from js-ctypes, by converting C++ code to C code.
Using JNI from js-ctypes
An example how to use Java from js-ctypes, by converting Java code into C code.
js-macosx

An extension that demonstrates JavaScript-Cocoa Bridge for Mac OS X. Lightweight bridge for calling Cocoa frameworks from JavaScript, js-macosx transparently handles definition of Cocoa API, both C and Objective-C, and provides automatic declarations for framework functions, structures, constants and enumerations, as well as allows creating and subclassing Cocoa classes. 

The js-macosx bridge has dependency on BridgeSupport metadata: whenever a Cocoa class, function, struct or const is encountered in the JavaScript code, js-macosx will replace it with the corresponding js-ctypes declaration based on the BridgeSupport file from the framework that object belongs to.

 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:89 次

字数:2426

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文