public void Dispose() { if (_self != null) { Release(); _self = null; } GC.SuppressFinalize(this); }
public static int get_array_length(cef_v8value_t *self) { get_array_length_delegate d; var p = self->_get_array_length; if (p == _p2a) { d = _d2a; } else { d = (get_array_length_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_length_delegate)); if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } } return(d(self)); }
public static cef_v8handler_t *get_function_handler(cef_v8value_t *self) { get_function_handler_delegate d; var p = self->_get_function_handler; if (p == _p2c) { d = _d2c; } else { d = (get_function_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_handler_delegate)); if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } } return(d(self)); }
public static int set_user_data(cef_v8value_t *self, cef_base_t *user_data) { set_user_data_delegate d; var p = self->_set_user_data; if (p == _p26) { d = _d26; } else { d = (set_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_user_data_delegate)); if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } } return(d(self, user_data)); }
public static int get_externally_allocated_memory(cef_v8value_t *self) { get_externally_allocated_memory_delegate d; var p = self->_get_externally_allocated_memory; if (p == _p28) { d = _d28; } else { d = (get_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_externally_allocated_memory_delegate)); if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } } return(d(self)); }
public static int set_value_bykey(cef_v8value_t *self, cef_string_t *key, cef_v8value_t *value, CefV8PropertyAttribute attribute) { set_value_bykey_delegate d; var p = self->_set_value_bykey; if (p == _p22) { d = _d22; } else { d = (set_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_bykey_delegate)); if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } } return(d(self, key, value, attribute)); }
public static int set_value_byaccessor(cef_v8value_t *self, cef_string_t *key, CefV8AccessControl settings, CefV8PropertyAttribute attribute) { set_value_byaccessor_delegate d; var p = self->_set_value_byaccessor; if (p == _p24) { d = _d24; } else { d = (set_value_byaccessor_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byaccessor_delegate)); if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } } return(d(self, key, settings, attribute)); }
public static int has_exception(cef_v8value_t *self) { has_exception_delegate d; var p = self->_has_exception; if (p == _p17) { d = _d17; } else { d = (has_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_exception_delegate)); if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } } return(d(self)); }
public static cef_v8exception_t *get_exception(cef_v8value_t *self) { get_exception_delegate d; var p = self->_get_exception; if (p == _p18) { d = _d18; } else { d = (get_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_exception_delegate)); if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } } return(d(self)); }
public static cef_time_t get_date_value(cef_v8value_t *self) { get_date_value_delegate d; var p = self->_get_date_value; if (p == _p14) { d = _d14; } else { d = (get_date_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_date_value_delegate)); if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } } return(d(self)); }
public static int is_user_created(cef_v8value_t *self) { is_user_created_delegate d; var p = self->_is_user_created; if (p == _p16) { d = _d16; } else { d = (is_user_created_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_user_created_delegate)); if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } } return(d(self)); }
public static int get_bool_value(cef_v8value_t *self) { get_bool_value_delegate d; var p = self->_get_bool_value; if (p == _p10) { d = _d10; } else { d = (get_bool_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_bool_value_delegate)); if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } } return(d(self)); }
public static int is_same(cef_v8value_t *self, cef_v8value_t *that) { is_same_delegate d; var p = self->_is_same; if (p == _pf) { d = _df; } else { d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); if (_pf == IntPtr.Zero) { _df = d; _pf = p; } } return(d(self, that)); }
public static int is_function(cef_v8value_t *self) { is_function_delegate d; var p = self->_is_function; if (p == _pe) { d = _de; } else { d = (is_function_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_function_delegate)); if (_pe == IntPtr.Zero) { _de = d; _pe = p; } } return(d(self)); }
public static int is_array(cef_v8value_t *self) { is_array_delegate d; var p = self->_is_array; if (p == _pd) { d = _dd; } else { d = (is_array_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_array_delegate)); if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } } return(d(self)); }
public static int clear_exception(cef_v8value_t *self) { clear_exception_delegate d; var p = self->_clear_exception; if (p == _p19) { d = _d19; } else { d = (clear_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_exception_delegate)); if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } } return(d(self)); }
public static cef_v8value_t *get_value_byindex(cef_v8value_t *self, int index) { get_value_byindex_delegate d; var p = self->_get_value_byindex; if (p == _p21) { d = _d21; } else { d = (get_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_byindex_delegate)); if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } } return(d(self, index)); }
/// <summary> /// Evaluates the specified JavaScript code using this context's global object. /// On success |retval| will be set to the return value, if any, and the /// function will return true. On failure |exception| will be set to the /// exception, if any, and the function will return false. /// </summary> public bool TryEval(string code, out CefV8Value returnValue, out CefV8Exception exception) { bool result; cef_v8value_t * n_retval = null; cef_v8exception_t *n_exception = null; fixed(char *code_str = code) { var n_code = new cef_string_t(code_str, code != null ? code.Length : 0); result = cef_v8context_t.eval(_self, &n_code, &n_retval, &n_exception) != 0; } returnValue = n_retval != null?CefV8Value.FromNative(n_retval) : null; exception = n_exception != null?CefV8Exception.FromNative(n_exception) : null; return(result); }
public static int set_value_byindex(cef_v8value_t *self, int index, cef_v8value_t *value) { set_value_byindex_delegate d; var p = self->_set_value_byindex; if (p == _p23) { d = _d23; } else { d = (set_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byindex_delegate)); if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } } return(d(self, index, value)); }
public static int will_rethrow_exceptions(cef_v8value_t *self) { will_rethrow_exceptions_delegate d; var p = self->_will_rethrow_exceptions; if (p == _p1a) { d = _d1a; } else { d = (will_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(will_rethrow_exceptions_delegate)); if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } } return(d(self)); }
public static int get_keys(cef_v8value_t *self, cef_string_list *keys) { get_keys_delegate d; var p = self->_get_keys; if (p == _p25) { d = _d25; } else { d = (get_keys_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_keys_delegate)); if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } } return(d(self, keys)); }
public static int set_rethrow_exceptions(cef_v8value_t *self, int rethrow) { set_rethrow_exceptions_delegate d; var p = self->_set_rethrow_exceptions; if (p == _p1b) { d = _d1b; } else { d = (set_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_rethrow_exceptions_delegate)); if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } } return(d(self, rethrow)); }
public static cef_base_t *get_user_data(cef_v8value_t *self) { get_user_data_delegate d; var p = self->_get_user_data; if (p == _p27) { d = _d27; } else { d = (get_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_user_data_delegate)); if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } } return(d(self)); }
public static int has_value_byindex(cef_v8value_t *self, int index) { has_value_byindex_delegate d; var p = self->_has_value_byindex; if (p == _p1d) { d = _d1d; } else { d = (has_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_value_byindex_delegate)); if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } } return(d(self, index)); }
public static int adjust_externally_allocated_memory(cef_v8value_t *self, int change_in_bytes) { adjust_externally_allocated_memory_delegate d; var p = self->_adjust_externally_allocated_memory; if (p == _p29) { d = _d29; } else { d = (adjust_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(adjust_externally_allocated_memory_delegate)); if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } } return(d(self, change_in_bytes)); }
public static int delete_value_bykey(cef_v8value_t *self, cef_string_t *key) { delete_value_bykey_delegate d; var p = self->_delete_value_bykey; if (p == _p1e) { d = _d1e; } else { d = (delete_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_bykey_delegate)); if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } } return(d(self, key)); }
public static cef_string_userfree *get_function_name(cef_v8value_t *self) { get_function_name_delegate d; var p = self->_get_function_name; if (p == _p2b) { d = _d2b; } else { d = (get_function_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_name_delegate)); if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } } return(d(self)); }
public static int delete_value_byindex(cef_v8value_t *self, int index) { delete_value_byindex_delegate d; var p = self->_delete_value_byindex; if (p == _p1f) { d = _d1f; } else { d = (delete_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_byindex_delegate)); if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } } return(d(self, index)); }
public static cef_v8value_t *execute_function_with_context(cef_v8value_t *self, cef_v8context_t *context, cef_v8value_t * @object, UIntPtr argumentsCount, cef_v8value_t **arguments) { execute_function_with_context_delegate d; var p = self->_execute_function_with_context; if (p == _p2e) { d = _d2e; } else { d = (execute_function_with_context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_function_with_context_delegate)); if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } } return(d(self, context, @object, argumentsCount, arguments)); }
public static cef_v8value_t *get_value_bykey(cef_v8value_t *self, cef_string_t *key) { get_value_bykey_delegate d; var p = self->_get_value_bykey; if (p == _p20) { d = _d20; } else { d = (get_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_bykey_delegate)); if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } } return(d(self, key)); }
public static int is_object(cef_v8value_t *self) { is_object_delegate d; var p = self->_is_object; if (p == _pc) { d = _dc; } else { d = (is_object_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_object_delegate)); if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } } return(d(self)); }
private static cef_v8value_t*[] CreateArgumentsArray(CefV8Value[] arguments) { if (arguments == null) return null; var length = arguments.Length; if (length == 0) return null; var result = new cef_v8value_t*[arguments.Length]; for (var i = 0; i < length; i++) { result[i] = arguments[i].GetNativePointerAndAddRef(); } return result; }
private CefV8Value(cef_v8value_t* ptr) { if (ptr == null) throw new ArgumentNullException("ptr"); _self = ptr; }