/// <summary> /// Sets the value at the specified key. Returns true (1) if the value was set /// successfully. If |value| represents simple data then the underlying data /// will be copied and modifications to |value| will not modify this object. If /// |value| represents complex data (binary, dictionary or list) then the /// underlying data will be referenced and modifications to |value| will modify /// this object. /// </summary> public unsafe virtual bool SetValue(string key, CefValue value) { fixed(char *s0 = key) { var cstr0 = new cef_string_t { Str = s0, Length = key != null ? key.Length : 0 }; return(SafeCall(NativeInstance->SetValue(&cstr0, (value != null) ? value.GetNativeInstance() : null) != 0)); } }
/// <summary> /// Set the |value| associated with preference |name|. Returns true (1) if the /// value is set successfully and false (0) otherwise. If |value| is NULL the /// preference will be restored to its default value. If setting the preference /// fails then |error| will be populated with a detailed description of the /// problem. This function must be called on the browser process UI thread. /// </summary> public unsafe virtual bool SetPreference(string name, CefValue value, ref string error) { fixed(char *s0 = name) fixed(char *s2 = error) { var cstr0 = new cef_string_t { Str = s0, Length = name != null ? name.Length : 0 }; var cstr2 = new cef_string_t { Str = s2, Length = error != null ? error.Length : 0 }; var rv = NativeInstance->SetPreference(&cstr0, (value != null) ? value.GetNativeInstance() : null, &cstr2) != 0; error = CefString.ReadAndFree(&cstr2); GC.KeepAlive(this); return(rv); } }
/// <summary> /// Sets the value at the specified index. Returns true (1) if the value was /// set successfully. If |value| represents simple data then the underlying /// data will be copied and modifications to |value| will not modify this /// object. If |value| represents complex data (binary, dictionary or list) /// then the underlying data will be referenced and modifications to |value| /// will modify this object. /// </summary> public unsafe virtual bool SetValue(long index, CefValue value) { return(SafeCall(NativeInstance->SetValue(new UIntPtr((ulong)index), (value != null) ? value.GetNativeInstance() : null) != 0)); }
/// <summary> /// Returns true (1) if this object and |that| object have the same underlying /// data. If true (1) modifications to this object will also affect |that| /// object and vice-versa. /// </summary> public unsafe virtual bool IsSame(CefValue that) { return(SafeCall(NativeInstance->IsSame((that != null) ? that.GetNativeInstance() : null) != 0)); }