Changeset View
Changeset View
Standalone View
Standalone View
source/gui/scripting/JSInterface_IGUIObject.h
Show All 14 Lines | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_JSI_IGUIOBJECT | #ifndef INCLUDED_JSI_IGUIOBJECT | ||||
#define INCLUDED_JSI_IGUIOBJECT | #define INCLUDED_JSI_IGUIOBJECT | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
class IGUIObject; | |||||
class CStr8; | |||||
namespace JSI_IGUIObject | namespace JSI_IGUIObject | ||||
{ | { | ||||
extern JSClass JSI_class; | extern JSClass JSI_class; | ||||
extern JSFunctionSpec JSI_methods[]; | extern JSFunctionSpec JSI_methods[]; | ||||
bool getProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp); | |||||
bool setProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, bool UNUSED(strict), JS::MutableHandleValue vp); | bool performOnGUIObject(JSContext* cx, JS::HandleObject thisObj, JS::MutableHandleValue vp, std::function<bool(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp)> action); | ||||
bool toString(JSContext* cx, uint argc, JS::Value* vp); | bool performObjectProperty(JSContext* cx, JS::HandleObject vp, JS::HandleId id, JS::MutableHandleValue, std::function<bool(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp)> action); | ||||
bool focus(JSContext* cx, uint argc, JS::Value* vp); | bool performObjectFunction(JSContext* cx, JS::Value* vp, std::function<bool(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp)> action); | ||||
bool blur(JSContext* cx, uint argc, JS::Value* vp); | bool getProperty(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | ||||
bool getComputedSize(JSContext* cx, uint argc, JS::Value* vp); | bool setProperty(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | ||||
bool getTextSize(JSContext* cx, uint argc, JS::Value* vp); | bool getName(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | ||||
bool setName(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | |||||
CStr8 getEventName(const CStr8& propName); | |||||
bool getEventHandler(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | |||||
bool setEventHandler(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | |||||
bool getParent(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | |||||
bool getChildren(JSContext* cx, IGUIObject& obj, const CStr8& propName, JS::MutableHandleValue vp); | |||||
void init(ScriptInterface& scriptInterface); | void init(ScriptInterface& scriptInterface); | ||||
bool toString(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp); | |||||
bool focus(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp); | |||||
bool blur(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp); | |||||
bool getComputedSize(JSContext* cx, IGUIObject& obj, JS::MutableHandleValue vp); | |||||
} | } | ||||
#endif // INCLUDED_JSI_IGUIOBJECT | #endif // INCLUDED_JSI_IGUIOBJECT |
Wildfire Games · Phabricator