use std::os::raw::c_void;
use std::ptr::null_mut;
use raw::{FunctionCallbackInfo, Isolate, Local};
#[repr(C)]
pub struct CCallback {
pub static_callback: *mut c_void,
pub dynamic_callback: *mut c_void
}
impl Default for CCallback {
fn default() -> Self {
CCallback {
static_callback: null_mut(),
dynamic_callback: null_mut()
}
}
}
extern "C" {
#[link_name = "Neon_Call_SetReturn"]
pub fn set_return(info: &FunctionCallbackInfo, value: Local);
#[link_name = "Neon_Call_GetIsolate"]
pub fn get_isolate(info: &FunctionCallbackInfo) -> *mut Isolate;
#[link_name = "Neon_Call_CurrentIsolate"]
pub fn current_isolate() -> *mut Isolate;
#[link_name = "Neon_Call_IsConstruct"]
pub fn is_construct(info: &FunctionCallbackInfo) -> bool;
#[link_name = "Neon_Call_This"]
pub fn this(info: &FunctionCallbackInfo, out: &mut Local);
#[link_name = "Neon_Call_Data"]
pub fn data(info: &FunctionCallbackInfo, out: &mut Local);
#[link_name = "Neon_Call_Length"]
pub fn len(info: &FunctionCallbackInfo) -> i32;
#[link_name = "Neon_Call_Get"]
pub fn get(info: &FunctionCallbackInfo, i: i32, out: &mut Local);
}