[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / EvasMap.cs
1 /*
2  * Copyright (c) 2016 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
19 namespace ElmSharp
20 {
21     /// <summary>
22     /// The EvasMap is an opaque handle to map points.
23     /// </summary>
24     /// <since_tizen> preview </since_tizen>
25     [Obsolete("This has been deprecated in API12")]
26     public class EvasMap
27     {
28         IntPtr _evasMap;
29         bool _ownership;
30
31         /// <summary>
32         /// Creates and initializes a new instance of the EvasMap class.
33         /// </summary>
34         /// <param name="count">The number of points in the map</param>
35         /// <since_tizen> preview </since_tizen>
36         [Obsolete("This has been deprecated in API12")]
37         public EvasMap(int count)
38         {
39             _evasMap = Interop.Evas.evas_map_new(count);
40             _ownership = true;
41         }
42
43         internal EvasMap(IntPtr handle)
44         {
45             _evasMap = handle;
46             _ownership = false;
47         }
48
49         /// <summary>
50         /// Destructor for the EvasMap class.
51         /// </summary>
52         ~EvasMap()
53         {
54             if (_ownership)
55             {
56                 Interop.Evas.evas_map_free(_evasMap);
57             }
58         }
59
60         internal IntPtr Handle
61         {
62             get
63             {
64                 return _evasMap;
65             }
66         }
67
68         /// <summary>
69         /// Gets or sets the flag of the object to move synchronization for map rendering.
70         /// </summary>
71         /// <since_tizen> preview </since_tizen>
72         [Obsolete("This has been deprecated in API12")]
73         public bool IsMoveSync
74         {
75             get
76             {
77                 return Interop.Evas.evas_map_util_object_move_sync_get(_evasMap);
78             }
79             set
80             {
81                 Interop.Evas.evas_map_util_object_move_sync_set(_evasMap, value);
82             }
83         }
84
85         /// <summary>
86         /// Populates the source and destination map points to exactly match the object.
87         /// </summary>
88         /// <param name="obj">The object to use unmapped geometry to populate the map coordinates.</param>
89         /// <since_tizen> preview </since_tizen>
90         [Obsolete("This has been deprecated in API12")]
91         public void PopulatePoints(EvasObject obj)
92         {
93             Interop.Evas.evas_map_util_points_populate_from_object_full(_evasMap, obj, 0);
94         }
95
96         /// <summary>
97         /// Populates the source and destination map points to exactly match the object.
98         /// </summary>
99         /// <param name="obj">The object to use unmapped geometry to populate the map coordinates.</param>
100         /// <param name="z">
101         /// The point Z-coordinate hint (pre-perspective transform). This value is used for all the four points.
102         /// </param>
103         /// <since_tizen> preview </since_tizen>
104         [Obsolete("This has been deprecated in API12")]
105         public void PopulatePoints(EvasObject obj, int z)
106         {
107             Interop.Evas.evas_map_util_points_populate_from_object_full(_evasMap, obj, z);
108         }
109
110         /// <summary>
111         /// Populates the source and destination map points to match the given geometry.
112         /// </summary>
113         /// <param name="geometry">The geometry value contains X-coordinate, Y-coordinate, the width and height to use, to calculate the second and third points.</param>
114         /// <param name="z">The Z-coordinate hint (pre-perspective transform) This value is used for all the four points.</param>
115         /// <since_tizen> preview </since_tizen>
116         [Obsolete("This has been deprecated in API12")]
117         public void PopulatePoints(Rect geometry, int z)
118         {
119             Interop.Evas.evas_map_util_points_populate_from_geometry(_evasMap, geometry.X, geometry.Y, geometry.Width, geometry.Height, z);
120         }
121
122         /// <summary>
123         /// Rotates the map.
124         /// </summary>
125         /// <param name="degrees">The abount of degrees from 0.0 to 360.0 to rotate.</param>
126         /// <param name="cx">The rotation's center horizontal position.</param>
127         /// <param name="cy">The rotation's center vertical position.</param>
128         /// <since_tizen> preview </since_tizen>
129         [Obsolete("This has been deprecated in API12")]
130         public void Rotate(double degrees, int cx, int cy)
131         {
132             Interop.Evas.evas_map_util_rotate(_evasMap, degrees, cx, cy);
133         }
134
135         /// <summary>
136         /// Rotates the map around 3 axes in 3D.
137         /// </summary>
138         /// <param name="dx">The amount of degrees from 0.0 to 360.0 to rotate around the X-axis.</param>
139         /// <param name="dy">The amount of degrees from 0.0 to 360.0 to rotate around the Y-axis.</param>
140         /// <param name="dz">The amount of degrees from 0.0 to 360.0 to rotate around the Z-axis.</param>
141         /// <param name="cx">The rotation's center horizontal position.</param>
142         /// <param name="cy">The rotation's center vertical position.</param>
143         /// <param name="cz">The rotation's center depth position.</param>
144         /// <since_tizen> preview </since_tizen>
145         [Obsolete("This has been deprecated in API12")]
146         public void Rotate3D(double dx, double dy, double dz, int cx, int cy, int cz)
147         {
148             Interop.Evas.evas_map_util_3d_rotate(_evasMap, dx, dy, dz, cx, cy, cz);
149         }
150
151         /// <summary>
152         /// Changes the map point's coordinate.
153         /// </summary>
154         /// <param name="idx">The index of point to change, this must be smaller than the map size.</param>
155         /// <param name="point">The 3D point coordinate.</param>
156         /// <since_tizen> preview </since_tizen>
157         [Obsolete("This has been deprecated in API12")]
158         public void SetPointCoordinate(int idx, Point3D point)
159         {
160             Interop.Evas.evas_map_point_coord_set(_evasMap, idx, point.X, point.Y, point.Z);
161         }
162
163         /// <summary>
164         /// Gets the map point's coordinate.
165         /// </summary>
166         /// <param name="idx">The index of point to change, this must be smaller than the map size.</param>
167         /// <returns>The coordinates of a given point in the map.</returns>
168         /// <since_tizen> preview </since_tizen>
169         [Obsolete("This has been deprecated in API12")]
170         public Point3D GetPointCoordinate(int idx)
171         {
172             Point3D point;
173             Interop.Evas.evas_map_point_coord_get(_evasMap, idx, out point.X, out point.Y, out point.Z);
174             return point;
175         }
176
177         /// <summary>
178         /// Changes the map to apply the given zooming.
179         /// </summary>
180         /// <param name="x">The horizontal zoom to use.</param>
181         /// <param name="y">The vertical zoom to use.</param>
182         /// <param name="cx">The zooming center horizontal position.</param>
183         /// <param name="cy">The zooming center vertical position.</param>
184         /// <since_tizen> preview </since_tizen>
185         [Obsolete("This has been deprecated in API12")]
186         public void Zoom(double x, double y, int cx, int cy)
187         {
188             Interop.Evas.evas_map_util_zoom(_evasMap, x, y, cx, cy);
189         }
190     }
191 }