static public int RemoveEventListeners(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             self.RemoveEventListeners();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             self.RemoveEventListeners(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 2
0
    static int RemoveEventListener(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes <FairyGUI.EventCallback0>(L, 3))
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                FairyGUI.EventCallback0 arg1 = (FairyGUI.EventCallback0)ToLua.ToObject(L, 3);
                obj.RemoveEventListener(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <FairyGUI.EventCallback1>(L, 3))
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                FairyGUI.EventCallback1 arg1 = (FairyGUI.EventCallback1)ToLua.ToObject(L, 3);
                obj.RemoveEventListener(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.RemoveEventListener"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 3
0
    static int RemoveEventListeners(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                obj.RemoveEventListeners();
                return(0);
            }
            else if (count == 2)
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.RemoveEventListeners(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.RemoveEventListeners"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static public int RemoveEventListener(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(string), typeof(FairyGUI.EventCallback1)))
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             FairyGUI.EventCallback1 a2;
             LuaDelegation.checkDelegate(l, 3, out a2);
             self.RemoveEventListener(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(FairyGUI.EventCallback0)))
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             FairyGUI.EventCallback0 a2;
             LuaDelegation.checkDelegate(l, 3, out a2);
             self.RemoveEventListener(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int DispatchEvent(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(FairyGUI.EventContext)))
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             FairyGUI.EventContext    a1;
             checkType(l, 2, out a1);
             var ret = self.DispatchEvent(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(string)))
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             var ret = self.DispatchEvent(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             var ret = self.DispatchEvent(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 4)
         {
             FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
             System.String            a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             System.Object a3;
             checkType(l, 4, out a3);
             var ret = self.DispatchEvent(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int AddEventListener(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventDispatcher), typeof(string), typeof(FairyGUI.EventCallback1)))
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                FairyGUI.EventCallback1 arg1 = null;
                LuaTypes funcType3           = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (FairyGUI.EventCallback1)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(FairyGUI.EventCallback1), func) as FairyGUI.EventCallback1;
                }

                obj.AddEventListener(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventDispatcher), typeof(string), typeof(FairyGUI.EventCallback0)))
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                FairyGUI.EventCallback0 arg1 = null;
                LuaTypes funcType3           = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (FairyGUI.EventCallback0)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(FairyGUI.EventCallback0), func) as FairyGUI.EventCallback0;
                }

                obj.AddEventListener(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.AddEventListener"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.EventDispatcher o;
         o = new FairyGUI.EventDispatcher();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 8
0
    static int DispatchEvent(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <FairyGUI.EventContext>(L, 2))
            {
                FairyGUI.EventDispatcher obj  = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                FairyGUI.EventContext    arg0 = (FairyGUI.EventContext)ToLua.ToObject(L, 2);
                bool o = obj.DispatchEvent(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <string>(L, 2))
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                bool   o    = obj.DispatchEvent(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3)
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                bool   o    = obj.DispatchEvent(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 4)
            {
                FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                object arg2 = ToLua.ToVarObject(L, 4);
                bool   o    = obj.DispatchEvent(arg0, arg1, arg2);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.DispatchEvent"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 9
0
 static int RemoveTouchMonitor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.Stage           obj  = (FairyGUI.Stage)ToLua.CheckObject <FairyGUI.Stage>(L, 1);
         FairyGUI.EventDispatcher arg0 = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 2);
         obj.RemoveTouchMonitor(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 10
0
 static int IsTouchMonitoring(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.Stage           obj  = (FairyGUI.Stage)ToLua.CheckObject <FairyGUI.Stage>(L, 1);
         FairyGUI.EventDispatcher arg0 = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 2);
         bool o = obj.IsTouchMonitoring(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 11
0
 static int RemoveCapture(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         FairyGUI.EventCallback1 arg1 = (FairyGUI.EventCallback1)ToLua.CheckDelegate <FairyGUI.EventCallback1>(L, 3);
         obj.RemoveCapture(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 12
0
 static int isDispatching(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         bool   o    = obj.isDispatching(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 13
0
 static int AddTouchMonitor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.Stage           obj  = (FairyGUI.Stage)ToLua.CheckObject <FairyGUI.Stage>(L, 1);
         int                      arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         FairyGUI.EventDispatcher arg1 = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 3);
         obj.AddTouchMonitor(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_sender(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.EventContext    obj = (FairyGUI.EventContext)o;
            FairyGUI.EventDispatcher ret = obj.sender;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index sender on a nil value"));
        }
    }
    static int get_owner(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.EventListener   obj = (FairyGUI.EventListener)o;
            FairyGUI.EventDispatcher ret = obj.owner;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index owner on a nil value" : e.Message));
        }
    }
Ejemplo n.º 16
0
 static int BroadcastEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         object arg1 = ToLua.ToVarObject(L, 3);
         bool   o    = obj.BroadcastEvent(arg0, arg1);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int BroadcastEvent(IntPtr l)
 {
     try {
         FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l);
         System.String            a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         var ret = self.BroadcastEvent(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 18
0
    static int _CreateFairyGUI_EventDispatcher(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                FairyGUI.EventDispatcher obj = new FairyGUI.EventDispatcher();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.EventDispatcher.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 19
0
    static int _CreateFairyGUI_EventListener(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                FairyGUI.EventDispatcher arg0 = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1);
                string arg1 = ToLua.CheckString(L, 2);
                FairyGUI.EventListener obj = new FairyGUI.EventListener(arg0, arg1);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.EventListener.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 20
0
		internal void AddTouchEndMonitor(int touchId, EventDispatcher target)
		{
			TouchInfo touch = null;
			if (touchId == -1)
				touch = _touches[0];
			else
			{
				for (int j = 0; j < 5; j++)
				{
					touch = _touches[j];
					if (touch.touchId == touchId)
						break;
				}
			}
			if (touch.touchEndMonitors.IndexOf(target) == -1)
				touch.touchEndMonitors.Add(target);
		}
Ejemplo n.º 21
0
 public EventListener(EventDispatcher owner, string type)
 {
     this.owner = owner;
     this._type = type;
 }
Ejemplo n.º 22
0
 public EventBridge(EventDispatcher owner)
 {
     this.owner = owner;
 }
Ejemplo n.º 23
0
 public EventListener(EventDispatcher owner, string type)
 {
     _bridge = owner.GetEventBridge(type);
     _type   = type;
 }
Ejemplo n.º 24
0
 public EventListener(EventDispatcher owner, string type)
 {
     this.owner = owner;
     this._type = type;
 }
Ejemplo n.º 25
0
 public EventBridge(EventDispatcher owner)
 {
     _owner = owner;
 }