[NUI] Fix ABI break (#731)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / DaliEnumConstants.cs
1 /*
2  * Copyright (c) 2018 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 using System;
18 using System.Reflection;
19 using System.Diagnostics;
20 using System.Runtime.CompilerServices;
21
22 namespace Tizen.NUI
23 {
24     namespace Constants
25     {
26         /// <summary>
27         /// Enumeration for texture types.
28         /// </summary>
29         /// <since_tizen> 3 </since_tizen>
30         public enum TextureType
31         {
32             /// <summary>
33             /// One 2D image
34             /// </summary>
35             /// <since_tizen> 3 </since_tizen>
36             Texture2D = Tizen.NUI.TextureType.TEXTURE_2D,
37             /// <summary>
38             /// Six 2D images arranged in a cube-shape
39             /// </summary>
40             /// <since_tizen> 3 </since_tizen>
41             TextureCube = Tizen.NUI.TextureType.TEXTURE_CUBE
42         }
43
44         /// <summary>
45         /// Enumeration for the direction
46         /// </summary>
47         /// <since_tizen> 3 </since_tizen>
48         public struct Direction
49         {
50             /// <summary>
51             /// Enumeration for the Direction types.
52             /// </summary>
53             /// <since_tizen> 3 </since_tizen>
54             public enum Type
55             {
56                 /// <summary>
57                 /// from Left to Right
58                 /// </summary>
59                 /// <since_tizen> 3 </since_tizen>
60                 LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT,
61                 /// <summary>
62                 /// from Right to Left
63                 /// </summary>
64                 /// <since_tizen> 3 </since_tizen>
65                 RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT
66             }
67         }
68
69         /// <summary>
70         /// ToolTip
71         /// </summary>
72         /// <since_tizen> 3 </since_tizen>
73         public struct Tooltip
74         {
75             /// <summary>
76             /// The properties used for a Tooltip.
77             /// </summary>
78             /// <since_tizen> 3 </since_tizen>
79             public struct Property
80             {
81                 /// <summary>
82                 /// The content to display.
83                 /// </summary>
84                 /// <since_tizen> 3 </since_tizen>
85                 public static readonly int Content = NDalic.TOOLTIP_CONTENT;
86                 /// <summary>
87                 /// The layout of the content.
88                 /// </summary>\
89                 /// <since_tizen> 3 </since_tizen>
90                 public static readonly int Layout = NDalic.TOOLTIP_LAYOUT;
91                 /// <summary>
92                 /// Time to wait in seconds before a tooltip is shown while the is movement is within the allowed threshold.
93                 /// </summary>
94                 /// <since_tizen> 3 </since_tizen>
95                 public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME;
96                 /// <summary>
97                 /// The background of the tooltip.
98                 /// </summary>
99                 /// <since_tizen> 3 </since_tizen>
100                 public static readonly int Background = NDalic.TOOLTIP_BACKGROUND;
101                 /// <summary>
102                 /// The tail used by the tooltip.
103                 /// </summary>
104                 /// <since_tizen> 3 </since_tizen>
105                 public static readonly int Tail = NDalic.TOOLTIP_TAIL;
106                 /// <summary>
107                 /// The position of the tooltip in relation to the control.
108                 /// </summary>
109                 /// <since_tizen> 3 </since_tizen>
110                 public static readonly int Position = NDalic.TOOLTIP_POSITION;
111                 /// <summary>
112                 /// If Tooltip::Position::HOVER_POINT is used for the POSITION, then this is the offset the tooltip is displayed at from the hover point.
113                 /// </summary>
114                 /// <since_tizen> 3 </since_tizen>
115                 public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET;
116                 /// <summary>
117                 /// The movement threshold allowed before showing (or hiding a popup).
118                 /// </summary>
119                 /// <since_tizen> 3 </since_tizen>
120                 public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD;
121                 /// <summary>
122                 /// If true, the tooltip will disappear after hover movement beyond a certain distance.
123                 /// </summary>
124                 /// <since_tizen> 3 </since_tizen>
125                 public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT;
126             }
127
128             /// <summary>
129             /// Background Property
130             /// </summary>
131             /// <since_tizen> 3 </since_tizen>
132             public struct BackgroundProperty
133             {
134                 /// <summary>
135                 /// The image to use as the background.
136                 /// </summary>
137                 /// <since_tizen> 3 </since_tizen>
138                 public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL;
139                 /// <summary>
140                 /// The size of the borders in the order: left, right, bottom, top.
141                 /// </summary>
142                 /// <since_tizen> 3 </since_tizen>
143                 public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER;
144             }
145
146             /// <summary>
147             /// The properties of the tail used by the tooltip.
148             /// </summary>
149             /// <since_tizen> 3 </since_tizen>
150             public struct TailProperty
151             {
152                 /// <summary>
153                 /// Whether to show the tail or not.
154                 /// </summary>
155                 /// <since_tizen> 3 </since_tizen>
156                 public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY;
157                 /// <summary>
158                 /// The image used for the tail if it is above the tooltip.
159                 /// </summary>
160                 /// <since_tizen> 3 </since_tizen>
161                 public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL;
162                 /// <summary>
163                 /// The image used for the tail if it is below the tooltip.
164                 /// </summary>
165                 /// <since_tizen> 3 </since_tizen>
166                 public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL;
167             }
168         }
169
170         /// <summary>
171         /// Enumeration for stereoscopic view modes.
172         /// </summary>
173         /// <since_tizen> 3 </since_tizen>
174         public enum ViewMode
175         {
176             /// <summary>
177             /// Monoscopic (single camera). This is the default.
178             /// </summary>
179             /// <since_tizen> 3 </since_tizen>
180             Mono,
181             /// <summary>
182             /// Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides.
183             /// </summary>
184             /// <since_tizen> 3 </since_tizen>
185             StereoHorizontal,
186             /// <summary>
187             /// Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom.
188             /// </summary>
189             /// <since_tizen> 3 </since_tizen>
190             StereoVertical,
191             /// <summary>
192             /// Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames.
193             /// </summary>
194             /// <since_tizen> 3 </since_tizen>
195             StereoInterlaced
196         }
197
198     } // namespace Constants
199
200
201     internal class NUILog
202     {
203         [Conditional("DEBUG_ON")]
204         public static void Debug(string msg,
205             [CallerLineNumber] int lineNum = 0,
206             [CallerMemberName] string caller = null,
207             [CallerFilePath] string file = null
208         )
209         {
210             Tizen.Log.Fatal("NUI", $"{msg} (at line {lineNum} of {caller} in {file})");
211         }
212
213         public static void Error(string msg,
214             [CallerLineNumber] int lineNum = 0,
215             [CallerMemberName] string caller = null,
216             [CallerFilePath] string file = null
217         )
218         {
219             Tizen.Log.Fatal("NUI", $"[ERROR] {msg} (at line {lineNum} of {caller} in {file})");
220         }
221     }
222
223 } // namesapce Dali