static int AddLongPressListener(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 4);
            UIBase obj  = (UIBase)ToLua.CheckObject(L, 1, typeof(UIBase));
            string arg0 = ToLua.CheckString(L, 2);
            InputEventHandle <InputUILongPressEvent> arg1 = null;
            LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (InputEventHandle <InputUILongPressEvent>)ToLua.CheckObject(L, 3, typeof(InputEventHandle <InputUILongPressEvent>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg1 = DelegateFactory.CreateDelegate(typeof(InputEventHandle <InputUILongPressEvent>), func) as InputEventHandle <InputUILongPressEvent>;
            }

            string arg2 = ToLua.CheckString(L, 4);
            obj.AddLongPressListener(arg0, arg1, arg2);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }