DALi C# binding - Write pure C# Color & Position classes and use typemaps to do the...
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / SWIG / renderer.i
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 %define Renderer_PROPERTIES_HELPER(NameSpace, ClassName)
19 %typemap(cscode) NameSpace::ClassName %{
20
21 /* Properties earlier added by Ruby Script */
22
23   public int DepthIndex
24   {
25     get
26     {
27       int temp = 0;
28       GetProperty( Renderer.Property.DEPTH_INDEX).Get( ref temp );
29       return temp;
30     }
31     set
32     {
33       SetProperty( Renderer.Property.DEPTH_INDEX, new Dali.Property.Value( value ) );
34     }
35   }
36   public int FaceCullingMode
37   {
38     get
39     {
40       int temp = 0;
41       GetProperty( Renderer.Property.FACE_CULLING_MODE).Get( ref temp );
42       return temp;
43     }
44     set
45     {
46       SetProperty( Renderer.Property.FACE_CULLING_MODE, new Dali.Property.Value( value ) );
47     }
48   }
49   public int BlendMode
50   {
51     get
52     {
53       int temp = 0;
54       GetProperty( Renderer.Property.BLEND_MODE).Get( ref temp );
55       return temp;
56     }
57     set
58     {
59       SetProperty( Renderer.Property.BLEND_MODE, new Dali.Property.Value( value ) );
60     }
61   }
62   public int BlendEquationRgb
63   {
64     get
65     {
66       int temp = 0;
67       GetProperty( Renderer.Property.BLEND_EQUATION_RGB).Get( ref temp );
68       return temp;
69     }
70     set
71     {
72       SetProperty( Renderer.Property.BLEND_EQUATION_RGB, new Dali.Property.Value( value ) );
73     }
74   }
75   public int BlendEquationAlpha
76   {
77     get
78     {
79       int temp = 0;
80       GetProperty( Renderer.Property.BLEND_EQUATION_ALPHA).Get( ref temp );
81       return temp;
82     }
83     set
84     {
85       SetProperty( Renderer.Property.BLEND_EQUATION_ALPHA, new Dali.Property.Value( value ) );
86     }
87   }
88   public int BlendFactorSrcRgb
89   {
90     get
91     {
92       int temp = 0;
93       GetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB).Get( ref temp );
94       return temp;
95     }
96     set
97     {
98       SetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB, new Dali.Property.Value( value ) );
99     }
100   }
101   public int BlendFactorDestRgb
102   {
103     get
104     {
105       int temp = 0;
106       GetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB).Get( ref temp );
107       return temp;
108     }
109     set
110     {
111       SetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB, new Dali.Property.Value( value ) );
112     }
113   }
114   public int BlendFactorSrcAlpha
115   {
116     get
117     {
118       int temp = 0;
119       GetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get( ref temp );
120       return temp;
121     }
122     set
123     {
124       SetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Dali.Property.Value( value ) );
125     }
126   }
127   public int BlendFactorDestAlpha
128   {
129     get
130     {
131       int temp = 0;
132       GetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get( ref temp );
133       return temp;
134     }
135     set
136     {
137       SetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Dali.Property.Value( value ) );
138     }
139   }
140   public Dali.CSharp.Color BlendColor
141   {
142     get
143     {
144       Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
145       GetProperty( Renderer.Property.BLEND_COLOR).Get(  temp );
146       Dali.CSharp.Color ret = new Dali.CSharp.Color(temp.r, temp.g, temp.b, temp.a);
147       return ret;
148     }
149     set
150     {
151       SetProperty( Renderer.Property.BLEND_COLOR, new Dali.Property.Value( value ) );
152     }
153   }
154   public bool BlendPreMultipliedAlpha
155   {
156     get
157     {
158       bool temp = false;
159       GetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get( ref temp );
160       return temp;
161     }
162     set
163     {
164       SetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Dali.Property.Value( value ) );
165     }
166   }
167   public int IndexRangeFirst
168   {
169     get
170     {
171       int temp = 0;
172       GetProperty( Renderer.Property.INDEX_RANGE_FIRST).Get( ref temp );
173       return temp;
174     }
175     set
176     {
177       SetProperty( Renderer.Property.INDEX_RANGE_FIRST, new Dali.Property.Value( value ) );
178     }
179   }
180   public int IndexRangeCount
181   {
182     get
183     {
184       int temp = 0;
185       GetProperty( Renderer.Property.INDEX_RANGE_COUNT).Get( ref temp );
186       return temp;
187     }
188     set
189     {
190       SetProperty( Renderer.Property.INDEX_RANGE_COUNT, new Dali.Property.Value( value ) );
191     }
192   }
193   public int DepthWriteMode
194   {
195     get
196     {
197       int temp = 0;
198       GetProperty( Renderer.Property.DEPTH_WRITE_MODE).Get( ref temp );
199       return temp;
200     }
201     set
202     {
203       SetProperty( Renderer.Property.DEPTH_WRITE_MODE, new Dali.Property.Value( value ) );
204     }
205   }
206   public int DepthFunction
207   {
208     get
209     {
210       int temp = 0;
211       GetProperty( Renderer.Property.DEPTH_FUNCTION).Get( ref temp );
212       return temp;
213     }
214     set
215     {
216       SetProperty( Renderer.Property.DEPTH_FUNCTION, new Dali.Property.Value( value ) );
217     }
218   }
219   public int DepthTestMode
220   {
221     get
222     {
223       int temp = 0;
224       GetProperty( Renderer.Property.DEPTH_TEST_MODE).Get( ref temp );
225       return temp;
226     }
227     set
228     {
229       SetProperty( Renderer.Property.DEPTH_TEST_MODE, new Dali.Property.Value( value ) );
230     }
231   }
232   public int RenderMode
233   {
234     get
235     {
236       int temp = 0;
237       GetProperty( Renderer.Property.RENDER_MODE).Get( ref temp );
238       return temp;
239     }
240     set
241     {
242       SetProperty( Renderer.Property.RENDER_MODE, new Dali.Property.Value( value ) );
243     }
244   }
245   public int StencilFunction
246   {
247     get
248     {
249       int temp = 0;
250       GetProperty( Renderer.Property.STENCIL_FUNCTION).Get( ref temp );
251       return temp;
252     }
253     set
254     {
255       SetProperty( Renderer.Property.STENCIL_FUNCTION, new Dali.Property.Value( value ) );
256     }
257   }
258   public int StencilFunctionMask
259   {
260     get
261     {
262       int temp = 0;
263       GetProperty( Renderer.Property.STENCIL_FUNCTION_MASK).Get( ref temp );
264       return temp;
265     }
266     set
267     {
268       SetProperty( Renderer.Property.STENCIL_FUNCTION_MASK, new Dali.Property.Value( value ) );
269     }
270   }
271   public int StencilFunctionReference
272   {
273     get
274     {
275       int temp = 0;
276       GetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get( ref temp );
277       return temp;
278     }
279     set
280     {
281       SetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Dali.Property.Value( value ) );
282     }
283   }
284   public int StencilMask
285   {
286     get
287     {
288       int temp = 0;
289       GetProperty( Renderer.Property.STENCIL_MASK).Get( ref temp );
290       return temp;
291     }
292     set
293     {
294       SetProperty( Renderer.Property.STENCIL_MASK, new Dali.Property.Value( value ) );
295     }
296   }
297   public int StencilOperationOnFail
298   {
299     get
300     {
301       int temp = 0;
302       GetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get( ref temp );
303       return temp;
304     }
305     set
306     {
307       SetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Dali.Property.Value( value ) );
308     }
309   }
310   public int StencilOperationOnZFail
311   {
312     get
313     {
314       int temp = 0;
315       GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get( ref temp );
316       return temp;
317     }
318     set
319     {
320       SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Dali.Property.Value( value ) );
321     }
322   }
323   public int StencilOperationOnZPass
324   {
325     get
326     {
327       int temp = 0;
328       GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get( ref temp );
329       return temp;
330     }
331     set
332     {
333       SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Dali.Property.Value( value ) );
334     }
335   }
336   public bool BatchingEnabled
337   {
338     get
339     {
340       bool temp = false;
341       GetProperty( Renderer.Property.BATCHING_ENABLED).Get( ref temp );
342       return temp;
343     }
344     set
345     {
346       SetProperty( Renderer.Property.BATCHING_ENABLED, new Dali.Property.Value( value ) );
347     }
348   }
349
350
351 /* Properties ends */
352
353 %}
354 %enddef
355
356 namespace Dali
357 {
358   Renderer_PROPERTIES_HELPER(Dali, Renderer);
359 }