d73402cfd19ff0b32066bb0b05b0954971e6568b
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / VisualFactory.cs
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
2 // PROPRIETARY/CONFIDENTIAL \r
3 // This software is the confidential and proprietary\r
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall\r
5 // not disclose such Confidential Information and shall use it only in\r
6 // accordance with the terms of the license agreement you entered into with\r
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the\r
8 // suitability of the software, either express or implied, including but not\r
9 // limited to the implied warranties of merchantability, fitness for a\r
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any\r
11 // damages suffered by licensee as a result of using, modifying or distributing\r
12 // this software or its derivatives.\r
13 \r
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
15 //\r
16 // Licensed under the Apache License, Version 2.0 (the "License");\r
17 // you may not use this file except in compliance with the License.\r
18 // You may obtain a copy of the License at\r
19 //\r
20 // http://www.apache.org/licenses/LICENSE-2.0\r
21 //\r
22 // Unless required by applicable law or agreed to in writing, software\r
23 // distributed under the License is distributed on an "AS IS" BASIS,\r
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
25 // See the License for the specific language governing permissions and\r
26 // limitations under the License.\r
27 //\r
28 \r
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts\r
30 // Some have been manually changed\r
31 \r
32 \r
33 namespace Tizen.NUI\r
34 {\r
35 \r
36     public class VisualFactory : BaseHandle\r
37     {\r
38         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
39 \r
40         internal VisualFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualFactory_SWIGUpcast(cPtr), cMemoryOwn)\r
41         {\r
42             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
43         }\r
44 \r
45         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualFactory obj)\r
46         {\r
47             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
48         }\r
49 \r
50         ~VisualFactory()\r
51         {\r
52             DisposeQueue.Instance.Add(this);\r
53         }\r
54 \r
55         public override void Dispose()\r
56         {\r
57             if (!Stage.IsInstalled())\r
58             {\r
59                 DisposeQueue.Instance.Add(this);\r
60                 return;\r
61             }\r
62 \r
63             lock (this)\r
64             {\r
65                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
66                 {\r
67                     if (swigCMemOwn)\r
68                     {\r
69                         swigCMemOwn = false;\r
70                         NDalicPINVOKE.delete_VisualFactory(swigCPtr);\r
71                     }\r
72                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
73                 }\r
74                 global::System.GC.SuppressFinalize(this);\r
75                 base.Dispose();\r
76             }\r
77         }\r
78 \r
79 \r
80         internal static VisualFactory Get()\r
81         {\r
82             VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Get(), true);\r
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
84             return ret;\r
85         }\r
86 \r
87         internal VisualFactory() : this(NDalicPINVOKE.new_VisualFactory__SWIG_0(), true)\r
88         {\r
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
90         }\r
91 \r
92         internal VisualFactory(VisualFactory handle) : this(NDalicPINVOKE.new_VisualFactory__SWIG_1(VisualFactory.getCPtr(handle)), true)\r
93         {\r
94             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
95         }\r
96 \r
97         internal VisualFactory Assign(VisualFactory handle)\r
98         {\r
99             VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Assign(swigCPtr, VisualFactory.getCPtr(handle)), false);\r
100             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
101             return ret;\r
102         }\r
103 \r
104         public VisualBase CreateVisual(PropertyMap propertyMap)\r
105         {\r
106             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_0(swigCPtr, PropertyMap.getCPtr(propertyMap)), true);\r
107             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
108             return ret;\r
109         }\r
110 \r
111         internal VisualBase CreateVisual(Image image)\r
112         {\r
113             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_1(swigCPtr, Image.getCPtr(image)), true);\r
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
115             return ret;\r
116         }\r
117 \r
118         internal VisualBase CreateVisual(string url, Uint16Pair size)\r
119         {\r
120             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(size)), true);\r
121             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
122             return ret;\r
123         }\r
124         private static readonly VisualFactory instance = VisualFactory.Get();\r
125 \r
126         public static VisualFactory Instance\r
127         {\r
128             get\r
129             {\r
130                 return instance;\r
131             }\r
132         }\r
133 \r
134     }\r
135 \r
136 }\r