1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
13 using System.Reflection;
19 internal class ItemFactory : global::System.IDisposable
21 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 protected bool swigCMemOwn;
24 internal ItemFactory(global::System.IntPtr cPtr, bool cMemoryOwn)
26 swigCMemOwn = cMemoryOwn;
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemFactory obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 DisposeQueue.Instance.Add(this);
40 public virtual void Dispose()
42 if (!Stage.IsInstalled())
44 DisposeQueue.Instance.Add(this);
50 if (swigCPtr.Handle != global::System.IntPtr.Zero)
55 NDalicPINVOKE.delete_ItemFactory(swigCPtr);
57 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
59 global::System.GC.SuppressFinalize(this);
64 public virtual uint GetNumberOfItems()
66 uint ret = NDalicPINVOKE.ItemFactory_GetNumberOfItems(swigCPtr);
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 public virtual Actor NewItem(uint itemId)
73 Actor ret = new Actor(NDalicPINVOKE.ItemFactory_NewItem(swigCPtr, itemId), true);
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 public virtual void ItemReleased(uint itemId, Actor actor)
80 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2)) NDalicPINVOKE.ItemFactory_ItemReleasedSwigExplicitItemFactory(swigCPtr, itemId, Actor.getCPtr(actor)); else NDalicPINVOKE.ItemFactory_ItemReleased(swigCPtr, itemId, Actor.getCPtr(actor));
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 public ItemFactory() : this(NDalicPINVOKE.new_ItemFactory(), true)
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 SwigDirectorConnect();
90 private void SwigDirectorConnect()
92 if (SwigDerivedClassHasMethod("GetNumberOfItems", swigMethodTypes0))
93 swigDelegate0 = new SwigDelegateItemFactory_0(SwigDirectorGetNumberOfItems);
94 if (SwigDerivedClassHasMethod("NewItem", swigMethodTypes1))
95 swigDelegate1 = new SwigDelegateItemFactory_1(SwigDirectorNewItem);
96 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2))
97 swigDelegate2 = new SwigDelegateItemFactory_2(SwigDirectorItemReleased);
98 NDalicPINVOKE.ItemFactory_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
102 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
104 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
105 bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(ItemFactory));
106 Tizen.Log.Debug("NUI-APP", "hasDerivedMethod=" + hasDerivedMethod);
107 return hasDerivedMethod;
110 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
112 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
113 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ItemFactory));
114 return hasDerivedMethod;
118 private uint SwigDirectorGetNumberOfItems()
120 return GetNumberOfItems();
123 private global::System.IntPtr SwigDirectorNewItem(uint itemId)
125 return Actor.getCPtr(NewItem(itemId)).Handle;
128 private void SwigDirectorItemReleased(uint itemId, global::System.IntPtr actor)
130 ItemReleased(itemId, new Actor(actor, true));
133 public delegate uint SwigDelegateItemFactory_0();
134 public delegate global::System.IntPtr SwigDelegateItemFactory_1(uint itemId);
135 public delegate void SwigDelegateItemFactory_2(uint itemId, global::System.IntPtr actor);
137 private SwigDelegateItemFactory_0 swigDelegate0;
138 private SwigDelegateItemFactory_1 swigDelegate1;
139 private SwigDelegateItemFactory_2 swigDelegate2;
141 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
142 private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(uint) };
143 private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(uint), typeof(Actor) };