[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / TransitEffect.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
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 using System;
18 using System.Collections.Generic;
19
20 namespace ElmSharp
21 {
22     /// <summary>
23     /// Enumeration for the axis along which flip effect should be applied.
24     /// </summary>
25     /// <since_tizen> preview </since_tizen>
26     [Obsolete("This has been deprecated in API12")]
27     public enum FlipAxis
28     {
29         /// <summary>
30         /// Flip on X-axis.
31         /// </summary>
32         X,
33
34         /// <summary>
35         /// Flip on Y-axis.
36         /// </summary>
37         Y,
38     }
39
40     /// <summary>
41     /// Enumeration for the direction in which the wipe effect should occur.
42     /// </summary>
43     /// <since_tizen> preview </since_tizen>
44     [Obsolete("This has been deprecated in API12")]
45     public enum WipeDirection
46     {
47         /// <summary>
48         /// Wipe to the left.
49         /// </summary>
50         Left,
51
52         /// <summary>
53         /// Wipe to the right.
54         /// </summary>
55         Right,
56
57         /// <summary>
58         /// Wipe to the up.
59         /// </summary>
60         Up,
61
62         /// <summary>
63         /// Wipe to the down.
64         /// </summary>
65         Down,
66     }
67
68     /// <summary>
69     /// Enumeration for whether the wipe effect should show or hide the object.
70     /// </summary>
71     /// <since_tizen> preview </since_tizen>
72     [Obsolete("This has been deprecated in API12")]
73     public enum WipeType
74     {
75         /// <summary>
76         /// Hide the object during the animation.
77         /// </summary>
78         Hide,
79
80         /// <summary>
81         /// Show the object during the animation.
82         /// </summary>
83         Show,
84     }
85
86     /// <summary>
87     /// Enumration for the type of acceleration used in transition.
88     /// </summary>
89     /// <since_tizen> preview </since_tizen>
90     [Obsolete("This has been deprecated in API12")]
91     public enum TweenMode
92     {
93         /// <summary>
94         /// Constant speed.
95         /// </summary>
96         Linear,
97
98         /// <summary>
99         /// Starts slow, increases speed over time, then decrease again and stop slowly, v1 being a power factor.
100         /// </summary>
101         Sinusoidal,
102
103         /// <summary>
104         /// Starts fast and decreases speed over time, v1 being a power factor.
105         /// </summary>
106         Decelerate,
107
108         /// <summary>
109         /// Starts slow and increases speed over time, v1 being a power factor.
110         /// </summary>
111         Accelerate,
112
113         /// <summary>
114         /// Starts at gradient v1, interpolated via power of v2 curve.
115         /// </summary>
116         DivisorInterpolate,
117
118         /// <summary>
119         /// Starts at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1.
120         /// </summary>
121         Bounce,
122
123         /// <summary>
124         /// Starts at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1.
125         /// </summary>
126         Spring,
127
128         /// <summary>
129         /// Follows the cubic-bezier curve calculated with the control points (x1, y1), (x2, y2).
130         /// </summary>
131         BezierCurve,
132     }
133
134     /// <summary>
135     /// Blend effect class.
136     /// </summary>
137     /// <since_tizen> preview </since_tizen>
138     [Obsolete("This has been deprecated in API12")]
139     public class BlendEffect : EffectBase
140     {
141         /// <summary>
142         /// Creates and initializes a new instance of the BlendEffect class.
143         /// </summary>
144         /// <since_tizen> preview </since_tizen>
145         [Obsolete("This has been deprecated in API12")]
146         public BlendEffect()
147         {
148         }
149
150         internal override IntPtr CreateEffect(IntPtr transit)
151         {
152             return Interop.Elementary.elm_transit_effect_blend_add(transit);
153         }
154     }
155
156     /// <summary>
157     /// Color effect class.
158     /// </summary>
159     /// <since_tizen> preview </since_tizen>
160     [Obsolete("This has been deprecated in API12")]
161     public class ColorEffect : EffectBase
162     {
163         Color _begin;
164         Color _end;
165
166         /// <summary>
167         /// Creates and initializes a new instance of the ColorEffect class.
168         /// </summary>
169         /// <param name="beginColor">The begin color of the effect.</param>
170         /// <param name="endColor">The end color of the effect.</param>
171         /// <since_tizen> preview </since_tizen>
172         [Obsolete("This has been deprecated in API12")]
173         public ColorEffect(Color beginColor, Color endColor)
174         {
175             _begin = beginColor;
176             _end = endColor;
177         }
178
179         /// <summary>
180         /// The begin color of the effect.
181         /// </summary>
182         /// <since_tizen> preview </since_tizen>
183         [Obsolete("This has been deprecated in API12")]
184         public Color BeginColor
185         {
186             get { return _begin; }
187         }
188
189         /// <summary>
190         /// The end color of the effect.
191         /// </summary>
192         /// <since_tizen> preview </since_tizen>
193         [Obsolete("This has been deprecated in API12")]
194         public Color EndColor
195         {
196             get { return _end; }
197         }
198
199         internal override IntPtr CreateEffect(IntPtr transit)
200         {
201             return Interop.Elementary.elm_transit_effect_color_add(transit, _begin.R, _begin.G, _begin.B, _begin.A, _end.R, _end.G, _end.B, _end.A);
202         }
203     }
204
205     /// <summary>
206     /// Fade effect class.
207     /// </summary>
208     /// <since_tizen> preview </since_tizen>
209     [Obsolete("This has been deprecated in API12")]
210     public class FadeEffect : EffectBase
211     {
212         /// <summary>
213         /// Creates and initializes a new instance of the FadeEffect class.
214         /// </summary>
215         /// <since_tizen> preview </since_tizen>
216         [Obsolete("This has been deprecated in API12")]
217         public FadeEffect()
218         {
219         }
220
221         internal override IntPtr CreateEffect(IntPtr transit)
222         {
223             return Interop.Elementary.elm_transit_effect_fade_add(transit);
224         }
225     }
226
227     /// <summary>
228     /// Flip effect class.
229     /// </summary>
230     /// <since_tizen> preview </since_tizen>
231     [Obsolete("This has been deprecated in API12")]
232     public class FlipEffect : EffectBase
233     {
234         FlipAxis _axis;
235         bool _clockWise;
236         bool _resizable;
237
238         /// <summary>
239         /// Creates and initializes a new instance of the FlipEffect class.
240         /// </summary>
241         /// <param name="axis">Flipping axis (X or Y).</param>
242         /// <param name="clockWise">Flipping Direction. True is clockwise.</param>
243         /// <param name="resizable">Resizable effect with FlipEffect.</param>
244         /// <since_tizen> preview </since_tizen>
245         [Obsolete("This has been deprecated in API12")]
246         public FlipEffect(FlipAxis axis, bool clockWise, bool resizable = false)
247         {
248             _axis = axis;
249             _clockWise = clockWise;
250             _resizable = resizable;
251         }
252
253         /// <summary>
254         /// Flipping axis (X or Y).
255         /// </summary>
256         /// <since_tizen> preview </since_tizen>
257         [Obsolete("This has been deprecated in API12")]
258         public FlipAxis Axis
259         {
260             get { return _axis; }
261         }
262
263         /// <summary>
264         /// Flipping direction. True is clockwise.
265         /// </summary>
266         /// <since_tizen> preview </since_tizen>
267         [Obsolete("This has been deprecated in API12")]
268         public bool ClockWise
269         {
270             get { return _clockWise; }
271         }
272
273         /// <summary>
274         /// Resizable FlipEffect.
275         /// </summary>
276         /// <since_tizen> preview </since_tizen>
277         [Obsolete("This has been deprecated in API12")]
278         public bool Resizable
279         {
280             get { return _resizable; }
281         }
282
283         internal override IntPtr CreateEffect(IntPtr transit)
284         {
285             if (_resizable)
286                 return Interop.Elementary.elm_transit_effect_resizable_flip_add(transit, (int)_axis, _clockWise);
287             return Interop.Elementary.elm_transit_effect_flip_add(transit, (int)_axis, _clockWise);
288         }
289     }
290
291     /// <summary>
292     /// Resizing effect class.
293     /// </summary>
294     /// <since_tizen> preview </since_tizen>
295     [Obsolete("This has been deprecated in API12")]
296     public class ResizingEffect : EffectBase
297     {
298         Size _begin;
299         Size _end;
300
301         /// <summary>
302         /// Creates and initializes a new instance of the ResizingEffect class.
303         /// </summary>
304         /// <param name="beginSize">The begin size of the effect.</param>
305         /// <param name="endSize">The end size of the effect.</param>
306         /// <since_tizen> preview </since_tizen>
307         [Obsolete("This has been deprecated in API12")]
308         public ResizingEffect(Size beginSize, Size endSize)
309         {
310             _begin = beginSize;
311             _end = endSize;
312         }
313
314         /// <summary>
315         /// The begin size of the effect.
316         /// </summary>
317         /// <since_tizen> preview </since_tizen>
318         [Obsolete("This has been deprecated in API12")]
319         public Size BeginSize
320         {
321             get { return _begin; }
322         }
323
324         /// <summary>
325         /// The end size of the effect.
326         /// </summary>
327         /// <since_tizen> preview </since_tizen>
328         [Obsolete("This has been deprecated in API12")]
329         public Size EndSize
330         {
331             get { return _end; }
332         }
333
334         internal override IntPtr CreateEffect(IntPtr transit)
335         {
336             return Interop.Elementary.elm_transit_effect_resizing_add(transit, _begin.Width, _begin.Height, _end.Width, _end.Height);
337         }
338     }
339
340     /// <summary>
341     /// Rotation effect class.
342     /// </summary>
343     /// <since_tizen> preview </since_tizen>
344     [Obsolete("This has been deprecated in API12")]
345     public class RotationEffect : EffectBase
346     {
347         float _begin;
348         float _end;
349
350         /// <summary>
351         /// Creates and initializes a new instance of the RotationEffect class.
352         /// </summary>
353         /// <param name="beginDegree">The begin degree of the effect.</param>
354         /// <param name="endDegree">The end degree of the effect.</param>
355         /// <since_tizen> preview </since_tizen>
356         [Obsolete("This has been deprecated in API12")]
357         public RotationEffect(float beginDegree, float endDegree)
358         {
359             _begin = beginDegree;
360             _end = endDegree;
361         }
362
363         /// <summary>
364         /// The begin degree of the effect.
365         /// </summary>
366         /// <since_tizen> preview </since_tizen>
367         [Obsolete("This has been deprecated in API12")]
368         public float BeginDegree
369         {
370             get { return _begin; }
371         }
372
373         /// <summary>
374         /// The end degree of the effect.
375         /// </summary>
376         /// <since_tizen> preview </since_tizen>
377         [Obsolete("This has been deprecated in API12")]
378         public float EndDegree
379         {
380             get { return _end; }
381         }
382
383         internal override IntPtr CreateEffect(IntPtr transit)
384         {
385             return Interop.Elementary.elm_transit_effect_rotation_add(transit, _begin, _end);
386         }
387     }
388
389     /// <summary>
390     /// Translation effect class.
391     /// </summary>
392     /// <since_tizen> preview </since_tizen>
393     [Obsolete("This has been deprecated in API12")]
394     public class TranslationEffect : EffectBase
395     {
396         Point _begin;
397         Point _end;
398
399         /// <summary>
400         /// Creates and initializes a new instance of the TranslationEffect class.
401         /// </summary>
402         /// <param name="beginPoint">The begin point of the effect.</param>
403         /// <param name="endPoint">The end point of the effect.</param>
404         /// <since_tizen> preview </since_tizen>
405         [Obsolete("This has been deprecated in API12")]
406         public TranslationEffect(Point beginPoint, Point endPoint)
407         {
408             _begin = beginPoint;
409             _end = endPoint;
410         }
411
412         /// <summary>
413         /// The begin point of the effect.
414         /// </summary>
415         /// <since_tizen> preview </since_tizen>
416         [Obsolete("This has been deprecated in API12")]
417         public Point BeginPoint
418         {
419             get { return _begin; }
420         }
421
422         /// <summary>
423         /// The end point of the effect.
424         /// </summary>
425         /// <since_tizen> preview </since_tizen>
426         [Obsolete("This has been deprecated in API12")]
427         public Point EndPoint
428         {
429             get { return _end; }
430         }
431
432         internal override IntPtr CreateEffect(IntPtr transit)
433         {
434             return Interop.Elementary.elm_transit_effect_translation_add(transit, _begin.X, _begin.Y, _end.X, _end.Y);
435         }
436     }
437
438     /// <summary>
439     /// Wipe effect class.
440     /// </summary>
441     /// <since_tizen> preview </since_tizen>
442     [Obsolete("This has been deprecated in API12")]
443     public class WipeEffect : EffectBase
444     {
445         WipeType _type;
446         WipeDirection _direction;
447
448         /// <summary>
449         /// Creates and initializes a new instance of the WipeEffect class.
450         /// </summary>
451         /// <param name="type">Wipe type. Hide or show.</param>
452         /// <param name="direction">Wipe direction.</param>
453         /// <since_tizen> preview </since_tizen>
454         [Obsolete("This has been deprecated in API12")]
455         public WipeEffect(WipeType type, WipeDirection direction)
456         {
457             _type = type;
458             _direction = direction;
459         }
460
461         /// <summary>
462         /// Wipe type. Hide or show.
463         /// </summary>
464         /// <since_tizen> preview </since_tizen>
465         [Obsolete("This has been deprecated in API12")]
466         public WipeType Type
467         {
468             get { return _type; }
469         }
470
471         /// <summary>
472         /// Wipe direction.
473         /// </summary>
474         /// <since_tizen> preview </since_tizen>
475         [Obsolete("This has been deprecated in API12")]
476         public WipeDirection Direction
477         {
478             get { return _direction; }
479         }
480
481         internal override IntPtr CreateEffect(IntPtr transit)
482         {
483             return Interop.Elementary.elm_transit_effect_wipe_add(transit, (int)_type, (int)_direction);
484         }
485     }
486
487     /// <summary>
488     /// Zoom effect class.
489     /// </summary>
490     /// <since_tizen> preview </since_tizen>
491     [Obsolete("This has been deprecated in API12")]
492     public class ZoomEffect : EffectBase
493     {
494         float _begin;
495         float _end;
496
497         /// <summary>
498         /// Creates and initializes a new instance of the ZoomEffect class.
499         /// </summary>
500         /// <param name="beginRate">The begin rate of the effect.</param>
501         /// <param name="endRate">The end rate of the effect.</param>
502         /// <since_tizen> preview </since_tizen>
503         [Obsolete("This has been deprecated in API12")]
504         public ZoomEffect(float beginRate, float endRate)
505         {
506             _begin = beginRate;
507             _end = endRate;
508         }
509
510         /// <summary>
511         /// The begin rate of the effect.
512         /// </summary>
513         /// <since_tizen> preview </since_tizen>
514         [Obsolete("This has been deprecated in API12")]
515         public float BeginRate
516         {
517             get { return _begin; }
518         }
519
520         /// <summary>
521         /// The end rate of the effect.
522         /// </summary>
523         /// <since_tizen> preview </since_tizen>
524         [Obsolete("This has been deprecated in API12")]
525         public float EndRate
526         {
527             get { return _end; }
528         }
529
530         internal override IntPtr CreateEffect(IntPtr transit)
531         {
532             return Interop.Elementary.elm_transit_effect_zoom_add(transit, _begin, _end);
533         }
534     }
535 }