00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asEventManager.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../core/EventManager.h"
00022
00023
00025 void bindEventManager(asIScriptEngine *engine)
00026 {
00027
00028 int r;
00029
00030
00031 r = engine->RegisterObjectType("EventManager", sizeof(EventManager), asOBJ_REF); assert(r >= 0);
00032
00033
00034 r = engine->RegisterObjectBehaviour("EventManager", asBEHAVE_ADDREF, "void f()",
00035 asMETHOD(EventManager, grab), asCALL_THISCALL); assert(r >= 0);
00036 r = engine->RegisterObjectBehaviour("EventManager", asBEHAVE_RELEASE, "void f()",
00037 asMETHOD(EventManager, drop), asCALL_THISCALL); assert(r >= 0);
00038
00039
00040 r = engine->RegisterObjectMethod("EventManager", "void init()",
00041 asMETHOD(EventManager, init), asCALL_THISCALL); assert(r >= 0);
00042 r = engine->RegisterObjectMethod("EventManager", "void clear()",
00043 asMETHOD(EventManager, clear), asCALL_THISCALL); assert(r >= 0);
00044
00045 r = engine->RegisterObjectMethod("EventManager", "bool createEventGroup(const string &in)",
00046 asMETHOD(EventManager, createEventGroup), asCALL_THISCALL); assert(r >= 0);
00047 r = engine->RegisterObjectMethod("EventManager", "bool createEventSlot(const string &in, const string &in)",
00048 asMETHOD(EventManager, createEventSlot), asCALL_THISCALL); assert(r >= 0);
00049
00050 r = engine->RegisterObjectMethod("EventManager", "bool getIsKeyDown(EKEY_CODE)",
00051 asMETHOD(EventManager, getIsKeyDown), asCALL_THISCALL); assert(r >= 0);
00052 r = engine->RegisterObjectMethod("EventManager", "bool getIsKeyUp(EKEY_CODE)",
00053 asMETHOD(EventManager, getIsKeyDown), asCALL_THISCALL); assert(r >= 0);
00054
00055 r = engine->RegisterObjectMethod("EventManager", "s32 getMouseX()",
00056 asMETHOD(EventManager, getMouseX), asCALL_THISCALL); assert(r >= 0);
00057 r = engine->RegisterObjectMethod("EventManager", "s32 getMouseY()",
00058 asMETHOD(EventManager, getMouseY), asCALL_THISCALL); assert(r >= 0);
00059 r = engine->RegisterObjectMethod("EventManager", "const vector2di& getMousePos()",
00060 asMETHOD(EventManager, getMousePos), asCALL_THISCALL); assert(r >= 0);
00061 r = engine->RegisterObjectMethod("EventManager", "f32 getMouseWheel()",
00062 asMETHOD(EventManager, getMouseWheel), asCALL_THISCALL); assert(r >= 0);
00063
00064 r = engine->RegisterObjectMethod("EventManager", "void removeEventGroups()",
00065 asMETHOD(EventManager, removeEventGroups), asCALL_THISCALL); assert(r >= 0);
00066 r = engine->RegisterObjectMethod("EventManager", "bool removeEventSlots(const string &in)",
00067 asMETHOD(EventManager, removeEventSlots), asCALL_THISCALL); assert(r >= 0);
00068 r = engine->RegisterObjectMethod("EventManager", "bool removeEventGroup(const string &in)",
00069 asMETHOD(EventManager, removeEventGroup), asCALL_THISCALL); assert(r >= 0);
00070 r = engine->RegisterObjectMethod("EventManager", "bool removeEventSlot(const string &in, const string &in)",
00071 asMETHOD(EventManager, removeEventSlot), asCALL_THISCALL); assert(r >= 0);
00072 }
00073
00074 #endif // __COMPILE_WITH_ANGELSCRIPT__
00075
00076