Skip to main content

cef_base_ref_counted_t

Type Alias cef_base_ref_counted_t 

Source
pub type cef_base_ref_counted_t = _cef_base_ref_counted_t;
Expand description

All ref-counted framework structures must include this structure first.

Aliased Type§

#[repr(C)]
pub struct cef_base_ref_counted_t { pub size: usize, pub add_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t)>, pub release: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>, pub has_one_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>, pub has_at_least_one_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>, }

Fields§

§size: usize

Size of the data structure.

§add_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t)>

Called to increment the reference count for the object. Should be called for every new copy of a pointer to a given object.

§release: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>

Called to decrement the reference count for the object. If the reference count falls to 0 the object should self-delete. Returns true (1) if the resulting reference count is 0.

§has_one_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>

Returns true (1) if the current reference count is 1.

§has_at_least_one_ref: Option<unsafe extern "C" fn(*mut _cef_base_ref_counted_t) -> i32>

Returns true (1) if the current reference count is at least 1.