public static JSClassID JS_NewClass(JSRuntime rt, JSClassID class_id, string class_name, JSClassFinalizer finalizer) { var fn_ptr = Marshal.GetFunctionPointerForDelegate(finalizer); return(__JSB_NewClass(rt, class_id, class_name, fn_ptr)); }
/// <summary> /// Create a new class ID. /// </summary> /// <returns> /// The new <see cref="JSClassID"/> that this method creates. /// </returns> public static JSClassID Create() { var cid = new JSClassID(); return(JS_NewClassID(ref cid)); }
private static extern JSClassID __JSB_NewClass(JSRuntime rt, JSClassID class_id, [MarshalAs(UnmanagedType.LPStr)] string class_name, IntPtr finalizer);
public static extern JSValue JS_GetClassProto(JSContext ctx, JSClassID class_id);
public static extern void JS_SetClassProto(JSContext ctx, JSClassID class_id, JSValue obj);
public static extern int JS_IsRegisteredClass(JSRuntime rt, JSClassID class_id);
public static extern JSValue JS_NewObjectProtoClass(JSContext ctx, JSValueConst proto, JSClassID class_id);