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