[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / FloatingButton.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 FloatingButton is a widget to add the floating area for buttons.
23     /// </summary>
24     /// <since_tizen> preview </since_tizen>
25     [Obsolete("This has been deprecated in API12")]
26     public class FloatingButton : Layout
27     {
28         /// <summary>
29         /// Creates and initializes a new instance of the FloatingButton class.
30         /// </summary>
31         /// <param name="parent">Created on this parent container.</param>
32         /// <since_tizen> preview </since_tizen>
33         [Obsolete("This has been deprecated in API12")]
34         public FloatingButton(EvasObject parent) : base(parent)
35         {
36         }
37
38         /// <summary>
39         /// Sets or gets the floatingbutton mode.
40         /// </summary>
41         /// <since_tizen> preview </since_tizen>
42         [Obsolete("This has been deprecated in API12")]
43         public FloatingButtonMode Mode
44         {
45             get
46             {
47                 return (FloatingButtonMode)Interop.Eext.eext_floatingbutton_mode_get(Handle);
48             }
49             set
50             {
51                 Interop.Eext.eext_floatingbutton_mode_set(Handle, (int)value);
52             }
53         }
54
55         /// <summary>
56         /// Gets the floatingbutton position.
57         /// </summary>
58         /// <since_tizen> preview </since_tizen>
59         [Obsolete("This has been deprecated in API12")]
60         public FloatingButtonPosition Position
61         {
62             get
63             {
64                 return (FloatingButtonPosition)Interop.Eext.eext_floatingbutton_pos_get(Handle);
65             }
66         }
67
68         /// <summary>
69         /// Sets or gets the movability for a given FloatingButton widget.
70         /// </summary>
71         /// <since_tizen> preview </since_tizen>
72         [Obsolete("This has been deprecated in API12")]
73         public bool MovementBlock
74         {
75             get
76             {
77                 return Interop.Eext.eext_floatingbutton_movement_block_get(Handle);
78             }
79             set
80             {
81                 Interop.Eext.eext_floatingbutton_movement_block_set(Handle, value);
82             }
83         }
84
85         /// <summary>
86         /// Gets the opacity's value of the given FloatingButton.
87         /// </summary>
88         /// <since_tizen> preview </since_tizen>
89         [Obsolete("This has been deprecated in API12")]
90         public override int Opacity
91         {
92             get
93             {
94                 return Color.Default.A;
95             }
96
97             set
98             {
99                 Console.WriteLine("FloatingButton instance doesn't support to set Opacity.");
100             }
101         }
102
103         /// <summary>
104         /// Set the floatingbutton position with or without animation.
105         /// </summary>
106         /// <param name="position">Button position.</param>
107         /// <param name="animated">Animation flag.</param>
108         /// <since_tizen> preview </since_tizen>
109         [Obsolete("This has been deprecated in API12")]
110         public void SetPosition(FloatingButtonPosition position, bool animated)
111         {
112             if (animated)
113             {
114                 Interop.Eext.eext_floatingbutton_pos_bring_in(Handle, (int)position);
115             }
116             else
117             {
118                 Interop.Eext.eext_floatingbutton_pos_set(Handle, (int)position);
119             }
120         }
121
122         /// <summary>
123         /// Creates a widget handle.
124         /// </summary>
125         /// <param name="parent">Parent EvasObject.</param>
126         /// <returns>Handle IntPtr.</returns>
127         /// <since_tizen> preview </since_tizen>
128         [Obsolete("This has been deprecated in API12")]
129         protected override IntPtr CreateHandle(EvasObject parent)
130         {
131             return Interop.Eext.eext_floatingbutton_add(parent.Handle);
132         }
133     }
134
135     /// <summary>
136     /// Enumeration for the FloatingButtonMode.
137     /// </summary>
138     /// <since_tizen> preview </since_tizen>
139     [Obsolete("This has been deprecated in API12")]
140     public enum FloatingButtonMode
141     {
142         /// <summary>
143         /// Allows all positions.
144         /// </summary>
145         All,
146
147         /// <summary>
148         /// Allows left and right positions only.
149         /// </summary>
150         LeftRightOnly,
151     }
152
153     /// <summary>
154     /// Enumeration for the FloatingButtonPosition.
155     /// </summary>
156     /// <since_tizen> preview </since_tizen>
157     [Obsolete("This has been deprecated in API12")]
158     public enum FloatingButtonPosition
159     {
160         /// <summary>
161         /// Hides in the left, but only the small handler will show.
162         /// </summary>
163         LeftOut,
164
165         /// <summary>
166         /// Shows all of the buttons, but lies on the left.
167         /// </summary>
168         Left,
169
170         /// <summary>
171         /// Shows all of the buttons, but lies on the center.
172         /// </summary>
173         Center,
174
175         /// <summary>
176         /// Shows all of the buttons, but lies on the right.
177         /// </summary>
178         Right,
179
180         /// <summary>
181         /// Hides in the right, but only the small handler will show.
182         /// </summary>
183         RightOut,
184     }
185 }