static int _m_AddCustomEventListener(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Maria.EventDispatcher __cl_gen_to_be_invoked = (Maria.EventDispatcher)translator.FastGetCSObj(L, 1); try { { string eventName = LuaAPI.lua_tostring(L, 2); Maria.EventListenerCustom.OnEventCustomHandler callback = translator.GetDelegate <Maria.EventListenerCustom.OnEventCustomHandler>(L, 3); object addition = translator.GetObject(L, 4, typeof(object)); Maria.EventListenerCustom __cl_gen_ret = __cl_gen_to_be_invoked.AddCustomEventListener(eventName, callback, addition); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _g_get_Addition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Maria.EventListenerCustom __cl_gen_to_be_invoked = (Maria.EventListenerCustom)translator.FastGetCSObj(L, 1); translator.PushAny(L, __cl_gen_to_be_invoked.Addition); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <Maria.EventListenerCustom.OnEventCustomHandler>(L, 3) && translator.Assignable <object>(L, 4)) { string name = LuaAPI.lua_tostring(L, 2); Maria.EventListenerCustom.OnEventCustomHandler callback = translator.GetDelegate <Maria.EventListenerCustom.OnEventCustomHandler>(L, 3); object addition = translator.GetObject(L, 4, typeof(object)); Maria.EventListenerCustom __cl_gen_ret = new Maria.EventListenerCustom(name, callback, addition); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to Maria.EventListenerCustom constructor!")); }
static int _m_UnsubCustomEventListener(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Maria.EventDispatcher __cl_gen_to_be_invoked = (Maria.EventDispatcher)translator.FastGetCSObj(L, 1); try { { Maria.EventListenerCustom listener = (Maria.EventListenerCustom)translator.GetObject(L, 2, typeof(Maria.EventListenerCustom)); bool __cl_gen_ret = __cl_gen_to_be_invoked.UnsubCustomEventListener(listener); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }