Does js-ctypes supports for nsISupports objects.

2015-12-23 Thread Yonggang Luo
-- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform

Re: Does js-ctypes supports for nsISupports objects.

2015-12-23 Thread Ted Mielczarek
No, js-ctypes does not have any support for calling methods on C++ classes. In fact, that functionality was WONTFIXed a while back: https://bugzilla.mozilla.org/show_bug.cgi?id=505907. -Ted ___ dev-platform mailing list dev-platform@lists.mozilla.org htt

Re: Does js-ctypes supports for nsISupports objects.

2015-12-23 Thread Yonggang Luo
OK, I've done it with my own patch, indeed, I just want to calling C APIs with XPCOM pointers. So I implemented the following function to deal with my situation: 512020db461367413e46bfeb3af8b70ed45e01f8 xpcom/components/nsComponentManager.cpp | 14 ++ xpcom/components/nsIComponentMa

Re: Does js-ctypes supports for nsISupports objects.

2015-12-23 Thread Cameron Kaiser
On 12/23/15 8:09 AM, 罗勇刚(Yonggang Luo) wrote: >No, js-ctypes does not have any support for calling methods on C++ >classes. In fact, that functionality was WONTFIXed a while back: >https://bugzilla.mozilla.org/show_bug.cgi?id=505907. OK, I've done it with my own patch, indeed, I just want to ca

Re: Does js-ctypes supports for nsISupports objects.

2015-12-23 Thread luoyonggang
// nsIComponentManager exports.getPointerForInterface = (obj, iid) => { return components.manager.getPointerForInterface(obj, iid) } xul.js: 'use strict' const { Cc, Ci } = require('chrome') exports.types = require('./types.js') const { ctypes, EnumType, default_abi, uint32_t } =