2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Reflection;
19 using System.Diagnostics;
20 using System.Runtime.CompilerServices;
27 /// Enumeration for texture types.
29 public enum TextureType
34 /// <since_tizen> 3 </since_tizen>
35 Texture2D = Tizen.NUI.TextureType.TEXTURE_2D,
37 /// Six 2D images arranged in a cube-shape
39 /// <since_tizen> 3 </since_tizen>
40 TextureCube = Tizen.NUI.TextureType.TEXTURE_CUBE
44 /// Enumeration for stereoscopic view modes.
49 /// Monoscopic (single camera). This is the default.
51 /// <since_tizen> 3 </since_tizen>
52 Mono = Tizen.NUI.ViewMode.MONO,
54 /// Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides.
56 /// <since_tizen> 3 </since_tizen>
57 StereoHorizontal = Tizen.NUI.ViewMode.STEREO_HORIZONTAL,
59 /// Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom.
61 /// <since_tizen> 3 </since_tizen>
62 StereoVertical = Tizen.NUI.ViewMode.STEREO_VERTICAL,
64 /// Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames.
66 /// <since_tizen> 3 </since_tizen>
67 StereoInterlaced = Tizen.NUI.ViewMode.STEREO_INTERLACED
71 /// Enumeration for the direction
73 /// <since_tizen> 3 </since_tizen>
74 public struct Direction
77 /// Enumeration for the Direction types.
79 /// <since_tizen> 3 </since_tizen>
83 /// from Left to Right
85 /// <since_tizen> 3 </since_tizen>
86 LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT,
88 /// from Right to Left
90 /// <since_tizen> 3 </since_tizen>
91 RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT
100 /// <since_tizen> 3 </since_tizen>
101 public struct Tooltip
104 /// The properties used for a Tooltip.
106 /// <since_tizen> 3 </since_tizen>
107 public struct Property
110 /// The content to display.
112 /// <since_tizen> 3 </since_tizen>
113 public static readonly int Content = NDalic.TOOLTIP_CONTENT;
115 /// The layout of the content.
117 /// <since_tizen> 3 </since_tizen>
118 public static readonly int Layout = NDalic.TOOLTIP_LAYOUT;
120 /// Time to wait in seconds before a tooltip is shown while the is movement is within the allowed threshold.
122 /// <since_tizen> 3 </since_tizen>
123 public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME;
125 /// The background of the tooltip.
127 /// <since_tizen> 3 </since_tizen>
128 public static readonly int Background = NDalic.TOOLTIP_BACKGROUND;
130 /// The tail used by the tooltip.
132 /// <since_tizen> 3 </since_tizen>
133 public static readonly int Tail = NDalic.TOOLTIP_TAIL;
135 /// The position of the tooltip in relation to the control.
137 /// <since_tizen> 3 </since_tizen>
138 public static readonly int Position = NDalic.TOOLTIP_POSITION;
140 /// If Tooltip::Position::HOVER_POINT is used for the POSITION, then this is the offset the tooltip is displayed at from the hover point.
142 /// <since_tizen> 3 </since_tizen>
143 public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET;
145 /// The movement threshold allowed before showing (or hiding a popup).
147 /// <since_tizen> 3 </since_tizen>
148 public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD;
150 /// If true, the tooltip will disappear after hover movement beyond a certain distance.
152 /// <since_tizen> 3 </since_tizen>
153 public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT;
157 /// Background Property
159 public struct BackgroundProperty
162 /// The image to use as the background.
164 /// <since_tizen> 3 </since_tizen>
165 public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL;
167 /// The size of the borders in the order: left, right, bottom, top.
169 /// <since_tizen> 3 </since_tizen>
170 public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER;
174 /// The properties of the tail used by the tooltip.
176 public struct TailProperty
179 /// Whether to show the tail or not.
181 /// <since_tizen> 3 </since_tizen>
182 public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY;
184 /// The image used for the tail if it is above the tooltip.
186 /// <since_tizen> 3 </since_tizen>
187 public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL;
189 /// The image used for the tail if it is below the tooltip.
191 /// <since_tizen> 3 </since_tizen>
192 public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL;
195 } // namespace Constants
198 internal class NUILog
200 [Conditional("DEBUG_ON")]
201 public static void Debug(string msg,
202 [CallerLineNumber] int lineNum = 0,
203 [CallerMemberName] string caller = null,
204 [CallerFilePath] string file = null
207 Tizen.Log.Fatal("NUI", $"{msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" );
210 public static void Error(string msg,
211 [CallerLineNumber] int lineNum = 0,
212 [CallerMemberName] string caller = null,
213 [CallerFilePath] string file = null
216 Tizen.Log.Fatal("NUI", $"[ERROR] {msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" );