Merge "C# CustomView Implementation (C++ wrappers, manual bindings, C# wrappers)...
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / Builder.cs
1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29     using System;
30     using System.Runtime.InteropServices;
31
32
33 public class Builder : BaseHandle {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal Builder(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Builder_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Builder obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~Builder() {
45     Dispose();
46   }
47
48   public override void Dispose() {
49     lock(this) {
50       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51         if (swigCMemOwn) {
52           swigCMemOwn = false;
53           NDalicPINVOKE.delete_Builder(swigCPtr);
54         }
55         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56       }
57       global::System.GC.SuppressFinalize(this);
58       base.Dispose();
59     }
60   }
61
62
63     public class QuitEventArgs : EventArgs
64     {
65     }
66
67     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
68     private delegate void QuitEventCallbackDelegate();
69     private DaliEventHandler<object,QuitEventArgs> _builderQuitEventHandler;
70     private QuitEventCallbackDelegate _builderQuitEventCallbackDelegate;
71
72     public event DaliEventHandler<object,QuitEventArgs> Quit
73     {
74       add
75       {
76         lock(this)
77         {
78           // Restricted to only one listener
79           if (_builderQuitEventHandler == null)
80           {
81             _builderQuitEventHandler += value;
82
83             _builderQuitEventCallbackDelegate = new QuitEventCallbackDelegate(OnQuit);
84             this.QuitSignal().Connect(_builderQuitEventCallbackDelegate);
85           }
86         }
87       }
88
89       remove
90       {
91         lock(this)
92         {
93           if (_builderQuitEventHandler != null)
94           {
95             this.QuitSignal().Disconnect(_builderQuitEventCallbackDelegate);
96           }
97
98           _builderQuitEventHandler -= value;
99         }
100       }
101     }
102
103     // Callback for Builder QuitSignal
104     private void OnQuit()
105     {
106       QuitEventArgs e = new QuitEventArgs();
107
108       if (_builderQuitEventHandler != null)
109       {
110         //here we send all data to user event handlers
111         _builderQuitEventHandler(this, e);
112       }
113     }
114
115     
116   public Builder () : this (NDalicPINVOKE.Builder_New(), true) {
117       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118
119   }
120   public void LoadFromString(string data, Builder.UIFormat format) {
121     NDalicPINVOKE.Builder_LoadFromString__SWIG_0(swigCPtr, data, (int)format);
122     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123   }
124
125   public void LoadFromString(string data) {
126     NDalicPINVOKE.Builder_LoadFromString__SWIG_1(swigCPtr, data);
127     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128   }
129
130   public void AddConstants(Property.Map map) {
131     NDalicPINVOKE.Builder_AddConstants(swigCPtr, Property.Map.getCPtr(map));
132     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133   }
134
135   public void AddConstant(string key, Property.Value value) {
136     NDalicPINVOKE.Builder_AddConstant(swigCPtr, key, Property.Value.getCPtr(value));
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public Property.Map GetConstants() {
141     Property.Map ret = new Property.Map(NDalicPINVOKE.Builder_GetConstants(swigCPtr), false);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143     return ret;
144   }
145
146   public Property.Value GetConstant(string key) {
147     Property.Value ret = new Property.Value(NDalicPINVOKE.Builder_GetConstant(swigCPtr, key), false);
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149     return ret;
150   }
151
152   public Animation CreateAnimation(string animationName) {
153     Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_0(swigCPtr, animationName), true);
154     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155     return ret;
156   }
157
158   public Animation CreateAnimation(string animationName, Property.Map map) {
159     Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_1(swigCPtr, animationName, Property.Map.getCPtr(map)), true);
160     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161     return ret;
162   }
163
164   public Animation CreateAnimation(string animationName, Actor sourceActor) {
165     Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_2(swigCPtr, animationName, Actor.getCPtr(sourceActor)), true);
166     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167     return ret;
168   }
169
170   public Animation CreateAnimation(string animationName, Property.Map map, Actor sourceActor) {
171     Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_3(swigCPtr, animationName, Property.Map.getCPtr(map), Actor.getCPtr(sourceActor)), true);
172     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173     return ret;
174   }
175
176   public BaseHandle Create(string templateName) {
177     BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_0(swigCPtr, templateName), true);
178     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179     return ret;
180   }
181
182   public BaseHandle Create(string templateName, Property.Map map) {
183     BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_1(swigCPtr, templateName, Property.Map.getCPtr(map)), true);
184     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185     return ret;
186   }
187
188   public BaseHandle CreateFromJson(string json) {
189     BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_CreateFromJson(swigCPtr, json), true);
190     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191     return ret;
192   }
193
194   public bool ApplyStyle(string styleName, Handle handle) {
195     bool ret = NDalicPINVOKE.Builder_ApplyStyle(swigCPtr, styleName, Handle.getCPtr(handle));
196     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197     return ret;
198   }
199
200   public bool ApplyFromJson(Handle handle, string json) {
201     bool ret = NDalicPINVOKE.Builder_ApplyFromJson(swigCPtr, Handle.getCPtr(handle), json);
202     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203     return ret;
204   }
205
206   public void AddActors(Actor toActor) {
207     NDalicPINVOKE.Builder_AddActors__SWIG_0(swigCPtr, Actor.getCPtr(toActor));
208     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209   }
210
211   public void AddActors(string sectionName, Actor toActor) {
212     NDalicPINVOKE.Builder_AddActors__SWIG_1(swigCPtr, sectionName, Actor.getCPtr(toActor));
213     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214   }
215
216   public void CreateRenderTask(string name) {
217     NDalicPINVOKE.Builder_CreateRenderTask(swigCPtr, name);
218     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219   }
220
221   public FrameBufferImage GetFrameBufferImage(string name) {
222     FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.Builder_GetFrameBufferImage(swigCPtr, name), true);
223     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224     return ret;
225   }
226
227   public Path GetPath(string name) {
228     Path ret = new Path(NDalicPINVOKE.Builder_GetPath(swigCPtr, name), true);
229     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230     return ret;
231   }
232
233   public PathConstrainer GetPathConstrainer(string pathConstrainerName) {
234     PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.Builder_GetPathConstrainer(swigCPtr, pathConstrainerName), true);
235     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236     return ret;
237   }
238
239   public LinearConstrainer GetLinearConstrainer(string linearConstrainerName) {
240     LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.Builder_GetLinearConstrainer(swigCPtr, linearConstrainerName), true);
241     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242     return ret;
243   }
244
245   public VoidSignal QuitSignal() {
246     VoidSignal ret = new VoidSignal(NDalicPINVOKE.Builder_QuitSignal(swigCPtr), false);
247     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248     return ret;
249   }
250
251   public enum UIFormat {
252     JSON
253   }
254
255 }
256
257 }