//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;

public class PrefabObjBinderWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(PrefabObjBinder), typeof(UnityEngine.MonoBehaviour));
		L.RegFunction("GetObj", GetObj);
		L.RegFunction("SetBtnClick", SetBtnClick);
		L.RegFunction("SetText", SetText);
		L.RegFunction("SetToggle", SetToggle);
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("items", get_items, set_items);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetObj(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			PrefabObjBinder obj = (PrefabObjBinder)ToLua.CheckObject<PrefabObjBinder>(L, 1);
			string arg0 = ToLua.CheckString(L, 2);
			UnityEngine.Object o = obj.GetObj(arg0);
			ToLua.Push(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetBtnClick(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabObjBinder obj = (PrefabObjBinder)ToLua.CheckObject<PrefabObjBinder>(L, 1);
			string arg0 = ToLua.CheckString(L, 2);
			System.Action arg1 = (System.Action)ToLua.CheckDelegate<System.Action>(L, 3);
			UnityEngine.UI.Button o = obj.SetBtnClick(arg0, arg1);
			ToLua.Push(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetText(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabObjBinder obj = (PrefabObjBinder)ToLua.CheckObject<PrefabObjBinder>(L, 1);
			string arg0 = ToLua.CheckString(L, 2);
			string arg1 = ToLua.CheckString(L, 3);
			UnityEngine.UI.Text o = obj.SetText(arg0, arg1);
			ToLua.Push(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetToggle(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabObjBinder obj = (PrefabObjBinder)ToLua.CheckObject<PrefabObjBinder>(L, 1);
			string arg0 = ToLua.CheckString(L, 2);
			System.Action<bool> arg1 = (System.Action<bool>)ToLua.CheckDelegate<System.Action<bool>>(L, 3);
			UnityEngine.UI.Toggle o = obj.SetToggle(arg0, arg1);
			ToLua.Push(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int op_Equality(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
			UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
			bool o = arg0 == arg1;
			LuaDLL.lua_pushboolean(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_items(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			PrefabObjBinder obj = (PrefabObjBinder)o;
			PrefabObjBinder.Item[] ret = obj.items;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index items on a nil value");
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int set_items(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			PrefabObjBinder obj = (PrefabObjBinder)o;
			PrefabObjBinder.Item[] arg0 = ToLua.CheckObjectArray<PrefabObjBinder.Item>(L, 2);
			obj.items = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index items on a nil value");
		}
	}
}

