Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / DaliEnumConstants.cs
1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */
16 using System;
17 using System.Reflection;
18 using System.Diagnostics;
19 using System.Runtime.CompilerServices;
20
21 namespace Tizen.NUI
22 {
23   namespace Constants
24   {
25     /// <summary>
26     /// Enumeration for texture types.
27     /// </summary>
28     public enum TextureType
29     {
30       Texture2D     = Tizen.NUI.TextureType.TEXTURE_2D,   ///< One 2D image
31       TextureCube   = Tizen.NUI.TextureType.TEXTURE_CUBE  ///< Six 2D images arranged in a cube-shape
32     }
33
34     /// <summary>
35     /// Enumeration for stereoscopic view modes.
36     /// </summary>
37     public enum ViewMode
38     {
39       Mono              = Tizen.NUI.ViewMode.MONO,                          ///< Monoscopic (single camera). This is the default.
40       StereoHorizontal  = Tizen.NUI.ViewMode.STEREO_HORIZONTAL, ///< Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides.
41       StereoVertical    = Tizen.NUI.ViewMode.STEREO_VERTICAL,     ///< Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom.
42       StereoInterlaced  = Tizen.NUI.ViewMode.STEREO_INTERLACED  ///< Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames.
43     }
44
45         public struct Direction
46         {
47             public enum Type
48             {
49                 LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT,
50                 RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT
51             }
52         }
53
54
55
56
57         public struct Tooltip
58         {
59             public struct Property
60             {
61                 public static readonly int Content = NDalic.TOOLTIP_CONTENT;
62                 public static readonly int Layout = NDalic.TOOLTIP_LAYOUT;
63                 public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME;
64                 public static readonly int Background = NDalic.TOOLTIP_BACKGROUND;
65                 public static readonly int Tail = NDalic.TOOLTIP_TAIL;
66                 public static readonly int Position = NDalic.TOOLTIP_POSITION;
67                 public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET;
68                 public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD;
69                 public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT;
70             }
71
72             public struct BackgroundProperty
73             {
74                 public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL;
75                 public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER;
76             }
77
78             public struct TailProperty
79             {
80                 public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY;
81                 public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL;
82                 public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL;
83             }
84         }
85     } // namespace Constants
86
87
88 internal class NUILog
89 {
90     [Conditional("DEBUG_ON")]
91     public static void Debug(string msg,
92         [CallerLineNumber] int lineNum = 0,
93         [CallerMemberName] string caller = null,
94         [CallerFilePath] string file = null
95     )
96     {
97         Tizen.Log.Debug("NUI", $"{msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" );
98     }
99
100     public static void Error(string msg,
101         [CallerLineNumber] int lineNum = 0,
102         [CallerMemberName] string caller = null,
103         [CallerFilePath] string file = null
104     )
105     {
106         Tizen.Log.Debug("NUI", $"[ERROR] {msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" );
107     }
108 }
109
110 } // namesapce Dali