X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/58321c0afd977fa7a47f5d81ee0674ca7582c309..7b750785c5d53fef6b885cc1fc4bd02ba6daeb1b:/JavaScript.hpp diff --git a/JavaScript.hpp b/JavaScript.hpp index 3fb2e6c..920df8c 100644 --- a/JavaScript.hpp +++ b/JavaScript.hpp @@ -22,6 +22,8 @@ #ifndef CYCRIPT_JAVASCRIPT_HPP #define CYCRIPT_JAVASCRIPT_HPP +#include + #include #include #include @@ -75,6 +77,8 @@ void CYSetProperty(JSContextRef context, JSObjectRef object, size_t index, JSVal void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef value, JSPropertyAttributes attributes = kJSPropertyAttributeNone); void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef (*callback)(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef *), JSPropertyAttributes attributes = kJSPropertyAttributeNone); +void CYSetPrototype(JSContextRef context, JSObjectRef object, JSValueRef prototype); + JSObjectRef CYGetCachedObject(JSContextRef context, JSStringRef name); JSValueRef CYCastJSValue(JSContextRef context, bool value); @@ -108,7 +112,8 @@ JSValueRef CYCallFunction(CYPool &pool, JSContextRef context, size_t setups, voi bool CYIsCallable(JSContextRef context, JSValueRef value); JSValueRef CYCallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef _this, size_t count, const JSValueRef arguments[]); -const char *CYPoolCCYON(CYPool &pool, JSContextRef context, JSObjectRef object); +const char *CYPoolCCYON(CYPool &pool, JSContextRef context, JSObjectRef object, std::set &objects); +std::set *CYCastObjects(JSContextRef context, JSObjectRef _this, size_t count, const JSValueRef arguments[]); struct CYHooks { void *(*ExecuteStart)(JSContextRef);