public static extern uint ValueCompare(ref JsonValue pval1, ref JsonValue pval2);
public static extern uint ValueType(ref JsonValue pval, out VALUE_TYPE pType, out int pUnits);
public static extern uint ValueStringData(ref JsonValue pval, out IntPtr pChars, out int pNumChars);
public static extern uint ValueToString(ref JsonValue pval, /*VALUE_STRING_CVT_TYPE*/ VALUE_STRING_CVT_TYPE how);
public static extern uint ValueInvoke(ref JsonValue pval, ref JsonValue pthis, uint argc, ref JsonValue argv, ref JsonValue pretval, [MarshalAs(UnmanagedType.LPWStr)] string url);
public static extern uint ValueNthElementValueSet(ref JsonValue pval, int n, ref JsonValue pval_to_set);
public static extern uint ValueFloatData(ref JsonValue pval, out double pData);
public static extern uint ValueBinaryDataSet(ref JsonValue pval, IntPtr pBytes, int nBytes, VALUE_TYPE type, int units);
public static extern uint ValueClear(ref JsonValue pval);
public static extern uint ValueBinaryData(ref JsonValue pval, out IntPtr pBytes, out int pnBytes);
/// <summary> /// Releases allocated array /// </summary> public static void FreeJsonArray(JsonValue[] arr) { foreach (var val in arr) val.Clear(); }
/// <summary> /// Converts array of <see cref="Object"/> to the array of <see cref="JsonValue"/> /// </summary> public static JsonValue[] CreateJsonArray(object[] args) { if (args != null) { var jsons = new JsonValue[args.Length]; for (int i = 0; i < args.Length; i++) { jsons[i] = new JsonValue(args[i]); } return jsons; } return null; }
public static extern uint ValueStringDataSet(ref JsonValue pval, [MarshalAs(UnmanagedType.LPWStr)] String chars, int numChars, VALUE_UNIT_TYPE units);
public static extern uint ValueCopy(ref JsonValue pdst, ref JsonValue psrc);
public static extern uint ValueInt64Data(ref JsonValue pval, out long pData);
public static extern uint ValueElementsCount(ref JsonValue pval, out int pn);
/// <summary> /// Calls scripting function /// </summary> public static object SciterCall(IntPtr hwnd, string functionName, params object[] args) { var jsonResult = new JsonValue(); var jsonParams = JsonValue.CreateJsonArray(args); try { SciterCall(hwnd, functionName, jsonParams.Length, jsonParams, out jsonResult); return jsonResult.GetValue(); } finally { JsonValue.FreeJsonArray(jsonParams); jsonResult.Clear(); } }
public static extern uint ValueEnumElements(ref JsonValue pval, KeyValueCallback penum, IntPtr param);
public static extern uint ValueNthElementValue(ref JsonValue pval, int n, ref JsonValue pretval);
public static extern uint ValueSetValueToKey(ref JsonValue pval, ref JsonValue pkey, ref JsonValue pval_to_set);
public static extern uint ValueFloatDataSet(ref JsonValue pval, double data, VALUE_TYPE type, int units);
public static extern uint ValueStringDataSet(ref JsonValue pval, [MarshalAs(UnmanagedType.LPWStr)]String chars, int numChars, VALUE_UNIT_TYPE units);
public static extern uint ValueFromString(ref JsonValue pval, [MarshalAs(UnmanagedType.LPWStr)] string str, int strLength, /*VALUE_STRING_CVT_TYPE*/ VALUE_STRING_CVT_TYPE how);
public static extern uint ValueGetValueOfKey(ref JsonValue pval, ref JsonValue pkey, ref JsonValue pretval);
public static extern uint ValueInit(ref JsonValue pval);
public static extern uint ValueIntData(ref JsonValue pval, out int pData);
public static extern uint ValueInt64DataSet(ref JsonValue pval, long data, VALUE_TYPE type, int units);
public static extern uint ValueIntDataSet(ref JsonValue pval, int data, VALUE_TYPE type, int units);
private static extern bool SciterCall(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string functionName, int argc, [MarshalAs(UnmanagedType.LPArray)] JsonValue[] argv, out JsonValue retval);