/* * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Tizen.NUI { namespace Constants { /// /// Enumeration for texture types. /// /// 3 public enum TextureType { /// /// One 2D image /// /// 3 Texture2D = Tizen.NUI.TextureType.TEXTURE_2D, /// /// Six 2D images arranged in a cube-shape /// /// 3 TextureCube = Tizen.NUI.TextureType.TEXTURE_CUBE } /// /// Enumeration for the direction /// /// 3 public struct Direction { /// /// Enumeration for the Direction types. /// /// 3 public enum Type { /// /// from Left to Right /// /// 3 LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT, /// /// from Right to Left /// /// 3 RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT } } /// /// ToolTip /// /// 3 public struct Tooltip { /// /// The properties used for a Tooltip. /// /// 3 public struct Property { /// /// The content to display. /// /// 3 public static readonly int Content = NDalic.TOOLTIP_CONTENT; /// /// The layout of the content. /// \ /// 3 public static readonly int Layout = NDalic.TOOLTIP_LAYOUT; /// /// Time to wait in seconds before a tooltip is shown while the is movement is within the allowed threshold. /// /// 3 public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME; /// /// The background of the tooltip. /// /// 3 public static readonly int Background = NDalic.TOOLTIP_BACKGROUND; /// /// The tail used by the tooltip. /// /// 3 public static readonly int Tail = NDalic.TOOLTIP_TAIL; /// /// The position of the tooltip in relation to the control. /// /// 3 public static readonly int Position = NDalic.TOOLTIP_POSITION; /// /// If Tooltip::Position::HOVER_POINT is used for the POSITION, then this is the offset the tooltip is displayed at from the hover point. /// /// 3 public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET; /// /// The movement threshold allowed before showing (or hiding a popup). /// /// 3 public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD; /// /// If true, the tooltip will disappear after hover movement beyond a certain distance. /// /// 3 public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT; } /// /// Background Property /// /// 3 public struct BackgroundProperty { /// /// The image to use as the background. /// /// 3 public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL; /// /// The size of the borders in the order: left, right, bottom, top. /// /// 3 public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER; } /// /// The properties of the tail used by the tooltip. /// /// 3 public struct TailProperty { /// /// Whether to show the tail or not. /// /// 3 public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY; /// /// The image used for the tail if it is above the tooltip. /// /// 3 public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL; /// /// The image used for the tail if it is below the tooltip. /// /// 3 public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL; } } /// /// Enumeration for stereoscopic view modes. /// /// 3 /// /// Deprecated.(API Level 6) Not used. /// [Obsolete("Please do not use this ViewMode(Deprecated).")] public enum ViewMode { /// /// Monoscopic (single camera). This is the default. /// /// 3 /// /// Deprecated.(API Level 6) Not used. /// [Obsolete("Please do not use this ViewMode.Mono(Deprecated).")] Mono, /// /// Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. /// /// 3 /// /// Deprecated.(API Level 6) Not used. /// [Obsolete("Please do not use this ViewMode.StereoHorizontal(Deprecated).")] StereoHorizontal, /// /// Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. /// /// 3 /// /// Deprecated.(API Level 6) Not used. /// [Obsolete("Please do not use this ViewMode.StereoVertical(Deprecated).")] StereoVertical, /// /// Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames. /// /// 3 /// /// Deprecated.(API Level 6) Not used. /// [Obsolete("Please do not use this ViewMode.StereoInterlaced(Deprecated).")] StereoInterlaced } } // namespace Constants internal class NUILog { [Conditional("NUI_DEBUG_ON")] public static void Debug(string msg, [CallerLineNumber] int lineNum = 0, [CallerMemberName] string caller = null, [CallerFilePath] string file = null ) { Tizen.Log.Fatal("NUI", $"{msg} (at line {lineNum} of {caller} in {file})"); } public static void Error(string msg, [CallerLineNumber] int lineNum = 0, [CallerMemberName] string caller = null, [CallerFilePath] string file = null ) { Tizen.Log.Fatal("NUI", $"[ERROR] {msg} (at line {lineNum} of {caller} in {file})"); } } #if !(NUI_DEBUG_ON) internal class tlog { internal static void Fatal(string tag, string msg) { } internal static void Error(string tag, string msg) { } } #endif }