Exemple #1
0
 public static extern int JS_HasProperty(JSContext ctx, JSValueConst this_obj, JSAtom prop);
Exemple #2
0
 public static extern JSValue JS_Invoke(JSContext ctx, JSValueConst this_val, JSAtom atom,
                                        int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)]
                                        JSValueConst[] argv);
Exemple #3
0
 public static extern int JS_SetPropertyInternal(JSContext ctx, JSValueConst this_obj, JSAtom prop, JSValue val,
                                                 int flags);
Exemple #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));
 }
Exemple #5
0
 public static extern JSValue JSB_NewPropertyObject(JSContext ctx, JSValueConst this_obj,
                                                    JSAtom name, JSPropFlags flags);
Exemple #6
0
        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));
        }
Exemple #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));
        }
Exemple #8
0
 public static JSValue JS_GetProperty(JSContext ctx, JSValueConst this_obj, JSAtom prop)
 {
     return(JS_GetPropertyInternal(ctx, this_obj, prop, this_obj, 0));
 }
Exemple #9
0
 public static extern void JS_FreeAtomRT(JSRuntime rt, JSAtom v);
Exemple #10
0
 public static extern JSValue JS_AtomToString(JSContext ctx, JSAtom atom);
Exemple #11
0
 public static extern void JS_FreeAtom(JSContext ctx, JSAtom v);
Exemple #12
0
 public static extern JSAtom JS_DupAtom(JSContext ctx, JSAtom v);
Exemple #13
0
        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));
        }
Exemple #14
0
 public static extern int JS_DeleteProperty(JSContext ctx, JSValueConst obj, JSAtom prop, int flags);
Exemple #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));
        }
Exemple #16
0
 public static extern JSValue JS_GetPropertyInternal(JSContext ctx, JSValueConst obj, JSAtom prop,
                                                     JSValueConst receiver, JS_BOOL throw_ref_error);
Exemple #17
0
 public static extern JSValue JSB_NewCFunctionMagic(JSContext ctx, IntPtr func, JSAtom atom, int length,
                                                    JSCFunctionEnum cproto, int magic);
Exemple #18
0
 public static extern unsafe int JS_GetOwnProperty(JSContext ctx, [In] JSPropertyDescriptor *desc, JSValueConst obj, JSAtom prop);
Exemple #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));
        }
Exemple #20
0
 public static extern int JS_DefineProperty(JSContext ctx, JSValueConst this_obj,
                                            JSAtom prop, JSValueConst val,
                                            JSValueConst getter, JSValueConst setter, JSPropFlags flags);
Exemple #21
0
        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));
        }