Fixed resource package install error
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / ItemFactory.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Dali {
12
13 internal class ItemFactory : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal ItemFactory(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemFactory obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~ItemFactory() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Window.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_ItemFactory(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49   public virtual uint GetNumberOfItems() {
50     uint ret = NDalicPINVOKE.ItemFactory_GetNumberOfItems(swigCPtr);
51     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52     return ret;
53   }
54
55   public virtual View NewItem(uint itemId) {
56     View ret = new View(NDalicPINVOKE.ItemFactory_NewItem(swigCPtr, itemId), true);
57     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58     return ret;
59   }
60
61   public virtual void ItemReleased(uint itemId, View view) {
62     if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2)) NDalicPINVOKE.ItemFactory_ItemReleasedSwigExplicitItemFactory(swigCPtr, itemId, View.getCPtr(view)); else NDalicPINVOKE.ItemFactory_ItemReleased(swigCPtr, itemId, View.getCPtr(view));
63     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64   }
65
66   public ItemFactory() : this(NDalicPINVOKE.new_ItemFactory(), true) {
67     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68     SwigDirectorConnect();
69   }
70
71   private void SwigDirectorConnect() {
72     if (SwigDerivedClassHasMethod("GetNumberOfItems", swigMethodTypes0))
73       swigDelegate0 = new SwigDelegateItemFactory_0(SwigDirectorGetNumberOfItems);
74     if (SwigDerivedClassHasMethod("NewItem", swigMethodTypes1))
75       swigDelegate1 = new SwigDelegateItemFactory_1(SwigDirectorNewItem);
76     if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2))
77       swigDelegate2 = new SwigDelegateItemFactory_2(SwigDirectorItemReleased);
78     NDalicPINVOKE.ItemFactory_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
79   }
80
81   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
82     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);
83     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ItemFactory));
84     return hasDerivedMethod;
85   }
86
87   private uint SwigDirectorGetNumberOfItems() {
88     return GetNumberOfItems();
89   }
90
91   private global::System.IntPtr SwigDirectorNewItem(uint itemId) {
92     return View.getCPtr(NewItem(itemId)).Handle;
93   }
94
95   private void SwigDirectorItemReleased(uint itemId, global::System.IntPtr actor) {
96     ItemReleased(itemId, new View(actor, true));
97   }
98
99   public delegate uint SwigDelegateItemFactory_0();
100   public delegate global::System.IntPtr SwigDelegateItemFactory_1(uint itemId);
101   public delegate void SwigDelegateItemFactory_2(uint itemId, global::System.IntPtr actor);
102
103   private SwigDelegateItemFactory_0 swigDelegate0;
104   private SwigDelegateItemFactory_1 swigDelegate1;
105   private SwigDelegateItemFactory_2 swigDelegate2;
106
107   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] {  };
108   private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(uint) };
109   private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(uint), typeof(View) };
110 }
111
112 }