コード例 #1
0
 public static extern int JS_HasProperty(JSContext ctx, JSValueConst this_obj, JSAtom prop);
コード例 #2
0
 public static extern JSValue JS_Invoke(JSContext ctx, JSValueConst this_val, JSAtom atom,
                                        int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)]
                                        JSValueConst[] argv);
コード例 #3
0
 public static extern int JS_SetPropertyInternal(JSContext ctx, JSValueConst this_obj, JSAtom prop, JSValue val,
                                                 int flags);
コード例 #4
0
 public static int JS_SetProperty(JSContext ctx, JSValueConst this_obj, JSAtom prop, JSValue val)
 {
     return(JS_SetPropertyInternal(ctx, this_obj, prop, val, (int)JSPropFlags.JS_PROP_THROW));
 }
コード例 #5
0
ファイル: JSApi.cs プロジェクト: xingchen1106/unity-jsb
 public static extern JSValue JSB_NewPropertyObject(JSContext ctx, JSValueConst this_obj,
                                                    JSAtom name, JSPropFlags flags);
コード例 #6
0
ファイル: JSApi.cs プロジェクト: liuwjchinal/unity-jsb
        public static JSValue JSB_NewCFunction(JSContext ctx, JSGetterCFunctionMagic func, JSAtom atom, int magic)
        {
#if JSB_UNITYLESS
            GCHandle.Alloc(func);
#endif
            var fn = Marshal.GetFunctionPointerForDelegate(func);
            return(JSB_NewCFunction(ctx, fn, atom, 0, JSCFunctionEnum.JS_CFUNC_getter_magic, magic));
        }
コード例 #7
0
        public static JSValue JSB_NewCFunction(JSContext ctx, JSGetterCFunction func, JSAtom atom)
        {
            var fn = Marshal.GetFunctionPointerForDelegate(func);

            return(JSB_NewCFunction(ctx, fn, atom, 0, JSCFunctionEnum.JS_CFUNC_getter, 0));
        }
コード例 #8
0
ファイル: JSApi.cs プロジェクト: xingchen1106/unity-jsb
 public static JSValue JS_GetProperty(JSContext ctx, JSValueConst this_obj, JSAtom prop)
 {
     return(JS_GetPropertyInternal(ctx, this_obj, prop, this_obj, 0));
 }
コード例 #9
0
 public static extern void JS_FreeAtomRT(JSRuntime rt, JSAtom v);
コード例 #10
0
 public static extern JSValue JS_AtomToString(JSContext ctx, JSAtom atom);
コード例 #11
0
 public static extern void JS_FreeAtom(JSContext ctx, JSAtom v);
コード例 #12
0
 public static extern JSAtom JS_DupAtom(JSContext ctx, JSAtom v);
コード例 #13
0
ファイル: JSApi.cs プロジェクト: liuwjchinal/unity-jsb
        public static JSValue JSB_NewCFunctionMagic(JSContext ctx, JSCFunctionMagic func, JSAtom atom, int length,
                                                    JSCFunctionEnum cproto, int magic)
        {
#if JSB_UNITYLESS
            GCHandle.Alloc(func);
#endif
            var fn = Marshal.GetFunctionPointerForDelegate(func);
            return(JSB_NewCFunctionMagic(ctx, fn, atom, length, cproto, magic));
        }
コード例 #14
0
 public static extern int JS_DeleteProperty(JSContext ctx, JSValueConst obj, JSAtom prop, int flags);
コード例 #15
0
        public static JSValue JSB_NewCFunction(JSContext ctx, JSSetterCFunctionMagic func, JSAtom atom, int magic)
        {
            var fn = Marshal.GetFunctionPointerForDelegate(func);

            return(JSB_NewCFunction(ctx, fn, atom, 1, JSCFunctionEnum.JS_CFUNC_setter_magic, magic));
        }
コード例 #16
0
ファイル: JSApi.cs プロジェクト: xingchen1106/unity-jsb
 public static extern JSValue JS_GetPropertyInternal(JSContext ctx, JSValueConst obj, JSAtom prop,
                                                     JSValueConst receiver, JS_BOOL throw_ref_error);
コード例 #17
0
 public static extern JSValue JSB_NewCFunctionMagic(JSContext ctx, IntPtr func, JSAtom atom, int length,
                                                    JSCFunctionEnum cproto, int magic);
コード例 #18
0
ファイル: JSApi.cs プロジェクト: xingchen1106/unity-jsb
 public static extern unsafe int JS_GetOwnProperty(JSContext ctx, [In] JSPropertyDescriptor *desc, JSValueConst obj, JSAtom prop);
コード例 #19
0
        public static JSValue JSB_NewCFunctionMagic(JSContext ctx, JSCFunctionMagic func, JSAtom atom, int length,
                                                    JSCFunctionEnum cproto, int magic)
        {
            var fn = Marshal.GetFunctionPointerForDelegate(func);

            return(JSB_NewCFunctionMagic(ctx, fn, atom, length, cproto, magic));
        }
コード例 #20
0
ファイル: JSApi.cs プロジェクト: xingchen1106/unity-jsb
 public static extern int JS_DefineProperty(JSContext ctx, JSValueConst this_obj,
                                            JSAtom prop, JSValueConst val,
                                            JSValueConst getter, JSValueConst setter, JSPropFlags flags);
コード例 #21
0
ファイル: JSApi.cs プロジェクト: liuwjchinal/unity-jsb
        public static JSValue JSB_NewCFunction(JSContext ctx, JSSetterCFunction func, JSAtom atom)
        {
#if JSB_UNITYLESS
            GCHandle.Alloc(func);
#endif
            var fn = Marshal.GetFunctionPointerForDelegate(func);
            return(JSB_NewCFunction(ctx, fn, atom, 1, JSCFunctionEnum.JS_CFUNC_setter, 0));
        }