#ifndef PL_V8_H
#define PL_V8_H
#include <v8.h>
#include "pl_config.h"
#include "ppport.h"
using
namespace
v8;
class
V8Context;
#if 0
#define PL_NAME_ROOT "_perl_"
#define PL_NAME_GENERIC_CALLBACK "generic_callback"
#define PL_SLOT_CREATE(name) (PL_NAME_ROOT "." #name)
#define PL_SLOT_GENERIC_CALLBACK PL_SLOT_CREATE(PL_NAME_GENERIC_CALLBACK)
#endif
SV* pl_v8_to_perl(pTHX_ V8Context* ctx,
const
Local<Object>& object);
const
Local<Object> pl_perl_to_v8(pTHX_ SV* value, V8Context* ctx);
SV* pl_get_global_or_property(pTHX_ V8Context* ctx,
const
char
* name);
SV* pl_exists_global_or_property(pTHX_ V8Context* ctx,
const
char
* name);
SV* pl_typeof_global_or_property(pTHX_ V8Context* ctx,
const
char
* name);
SV* pl_instanceof_global_or_property(pTHX_ V8Context* ctx,
const
char
* oname,
const
char
* cname);
int
pl_set_global_or_property(pTHX_ V8Context* ctx,
const
char
* name, SV* value);
int
pl_del_global_or_property(pTHX_ V8Context* ctx,
const
char
* name);
int
pl_run_gc(V8Context* ctx);
SV* pl_global_objects(pTHX_ V8Context* ctx);
bool
find_parent(V8Context* ctx,
const
char
* name, Local<Context>& context, Local<Object>& object, Local<Value>& slot,
int
create = 0);
bool
find_object(V8Context* ctx,
const
char
* name, Local<Context>& context, Local<Object>& object);
#endif