pub type cef_preference_registrar_t = _cef_preference_registrar_t;Expand description
Structure that manages custom preference registrations.
NOTE: This struct is allocated DLL-side.
Aliased Type§
#[repr(C)]pub struct cef_preference_registrar_t {
pub base: _cef_base_scoped_t,
pub add_preference: Option<unsafe extern "C" fn(*mut _cef_preference_registrar_t, *const _cef_string_utf16_t, *mut _cef_value_t) -> i32>,
}Fields§
§base: _cef_base_scoped_tBase structure.
add_preference: Option<unsafe extern "C" fn(*mut _cef_preference_registrar_t, *const _cef_string_utf16_t, *mut _cef_value_t) -> i32>Register a preference with the specified |name| and |default_value|. To avoid conflicts with built-in preferences the |name| value should contain an application-specific prefix followed by a period (e.g. “myapp.value”). The contents of |default_value| will be copied. The data type for the preference will be inferred from |default_value|’s type and cannot be changed after registration. Returns true (1) on success. Returns false (0) if |name| is already registered or if |default_value| has an invalid type. This function must be called from within the scope of the cef_browser_process_handler_t::OnRegisterCustomPreferences callback.