[NUI] Add license, delete unnecessary code (#2679)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / XamlBinding / NUIConstantExtension.cs
1 /*
2  * Copyright(c) 2021 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
18 using System;
19 using Tizen.NUI;
20 using Tizen.NUI.Binding;
21 using System.Collections.Generic;
22
23 namespace Tizen.NUI.Binding
24 {
25     internal static class VisualExtension
26     {
27         public static Dictionary<string, int> KeyDictionary = new Dictionary<string, int>()
28         {
29             // Visual.Property
30             { "Visual.Property.Type", Visual.Property.Type },
31             { "Visual.Property.Shader", Visual.Property.Shader },
32             { "Visual.Property.Transform", Visual.Property.Transform },
33             { "Visual.Property.PremultipliedAlpha", Visual.Property.PremultipliedAlpha },
34             { "Visual.Property.MixColor", Visual.Property.MixColor },
35             { "Visual.Property.Opacity", Visual.Property.Opacity },
36             // ShaderProperty
37             { "Visual.ShaderProperty.VertexShader", Visual.ShaderProperty.VertexShader },
38             { "Visual.ShaderProperty.FragmentShader", Visual.ShaderProperty.FragmentShader },
39             { "Visual.ShaderProperty.ShaderSubdivideGridX", Visual.ShaderProperty.ShaderSubdivideGridX },
40             { "Visual.ShaderProperty.ShaderSubdivideGridY", Visual.ShaderProperty.ShaderSubdivideGridY },
41             { "Visual.ShaderProperty.ShaderHints", Visual.ShaderProperty.ShaderHints },
42             // BorderVisualProperty
43             { "BorderVisualProperty.Color", BorderVisualProperty.Color },
44             { "BorderVisualProperty.Size", BorderVisualProperty.Size },
45             { "BorderVisualProperty.AntiAliasing", BorderVisualProperty.AntiAliasing },
46             // ColorVisualProperty
47             { "ColorVisualProperty.MixColor", ColorVisualProperty.MixColor},
48             // GradientVisualProperty
49             { "GradientVisualProperty.StartPosition", GradientVisualProperty.StartPosition },
50             { "GradientVisualProperty.EndPosition", GradientVisualProperty.EndPosition },
51             { "GradientVisualProperty.Center", GradientVisualProperty.Center },
52             { "GradientVisualProperty.Radius", GradientVisualProperty.Radius },
53             { "GradientVisualProperty.StopOffset", GradientVisualProperty.StopOffset },
54             { "GradientVisualProperty.StopColor", GradientVisualProperty.StopColor },
55             { "GradientVisualProperty.Units", GradientVisualProperty.Units },
56             { "GradientVisualProperty.SpreadMethod", GradientVisualProperty.SpreadMethod },
57             // ImageVisualProperty
58             { "ImageVisualProperty.URL", ImageVisualProperty.URL },
59             { "ImageVisualProperty.AlphaMaskURL", ImageVisualProperty.AlphaMaskURL },
60             { "ImageVisualProperty.FittingMode", ImageVisualProperty.FittingMode },
61             { "ImageVisualProperty.SamplingMode", ImageVisualProperty.SamplingMode },
62             { "ImageVisualProperty.DesiredWidth", ImageVisualProperty.DesiredWidth },
63             { "ImageVisualProperty.DesiredHeight", ImageVisualProperty.DesiredHeight },
64             { "ImageVisualProperty.SynchronousLoading", ImageVisualProperty.SynchronousLoading },
65             { "ImageVisualProperty.BorderOnly", ImageVisualProperty.BorderOnly },
66             { "ImageVisualProperty.PixelArea", ImageVisualProperty.PixelArea },
67             { "ImageVisualProperty.WrapModeU", ImageVisualProperty.WrapModeU },
68             { "ImageVisualProperty.WrapModeV", ImageVisualProperty.WrapModeV },
69             { "ImageVisualProperty.Border", ImageVisualProperty.Border },
70             { "ImageVisualProperty.MaskContentScale", ImageVisualProperty.MaskContentScale },
71             { "ImageVisualProperty.CropToMask", ImageVisualProperty.CropToMask },
72             { "ImageVisualProperty.BatchSize", ImageVisualProperty.BatchSize },
73             { "ImageVisualProperty.CacheSize", ImageVisualProperty.CacheSize },
74             { "ImageVisualProperty.FrameDelay", ImageVisualProperty.FrameDelay },
75             { "ImageVisualProperty.LoopCount", ImageVisualProperty.LoopCount },
76             { "ImageVisualProperty.ReleasePolicy", ImageVisualProperty.ReleasePolicy },
77             { "ImageVisualProperty.LoadPolicy", ImageVisualProperty.LoadPolicy },
78             { "ImageVisualProperty.OrientationCorrection", ImageVisualProperty.OrientationCorrection },
79             { "ImageVisualProperty.AuxiliaryImageURL", ImageVisualProperty.AuxiliaryImageURL },
80             { "ImageVisualProperty.AuxiliaryImageAlpha", ImageVisualProperty.AuxiliaryImageAlpha },
81             // MeshVisualProperty
82             { "MeshVisualProperty.ObjectURL", MeshVisualProperty.ObjectURL },
83             { "MeshVisualProperty.MaterialtURL", MeshVisualProperty.MaterialtURL },
84             { "MeshVisualProperty.TexturesPath", MeshVisualProperty.TexturesPath },
85             { "MeshVisualProperty.ShadingMode", MeshVisualProperty.ShadingMode },
86             { "MeshVisualProperty.UseMipmapping", MeshVisualProperty.UseMipmapping },
87             { "MeshVisualProperty.UseSoftNormals", MeshVisualProperty.UseSoftNormals },
88             { "MeshVisualProperty.LightPosition", MeshVisualProperty.LightPosition },
89             // PrimitiveVisualProperty
90             { "PrimitiveVisualProperty.Shape", PrimitiveVisualProperty.Shape },
91             { "PrimitiveVisualProperty.MixColor", PrimitiveVisualProperty.MixColor },
92             { "PrimitiveVisualProperty.Slices", PrimitiveVisualProperty.Slices },
93             { "PrimitiveVisualProperty.Stacks", PrimitiveVisualProperty.Stacks },
94             { "PrimitiveVisualProperty.ScaleTopRadius", PrimitiveVisualProperty.ScaleTopRadius },
95             { "PrimitiveVisualProperty.ScaleBottomRadius", PrimitiveVisualProperty.ScaleBottomRadius },
96             { "PrimitiveVisualProperty.ScaleHeight", PrimitiveVisualProperty.ScaleHeight },
97             { "PrimitiveVisualProperty.ScaleRadius", PrimitiveVisualProperty.ScaleRadius },
98             { "PrimitiveVisualProperty.ScaleDimensions", PrimitiveVisualProperty.ScaleDimensions },
99             { "PrimitiveVisualProperty.BevelPercentage", PrimitiveVisualProperty.BevelPercentage },
100             { "PrimitiveVisualProperty.BevelSmoothness", PrimitiveVisualProperty.BevelSmoothness },
101             { "PrimitiveVisualProperty.LightPosition", PrimitiveVisualProperty.LightPosition },
102             // TextVisualProperty
103             { "TextVisualProperty.Text", TextVisualProperty.Text },
104             { "TextVisualProperty.FontFamily", TextVisualProperty.FontFamily },
105             { "TextVisualProperty.FontStyle", TextVisualProperty.FontStyle },
106             { "TextVisualProperty.PointSize", TextVisualProperty.PointSize },
107             { "TextVisualProperty.MultiLine", TextVisualProperty.MultiLine },
108             { "TextVisualProperty.HorizontalAlignment", TextVisualProperty.HorizontalAlignment },
109             { "TextVisualProperty.VerticalAlignment", TextVisualProperty.VerticalAlignment },
110             { "TextVisualProperty.TextColor", TextVisualProperty.TextColor },
111             { "TextVisualProperty.EnableMarkup", TextVisualProperty.EnableMarkup },
112             // NpatchImageVisualProperty
113             { "NpatchImageVisualProperty.URL", NpatchImageVisualProperty.URL },
114             { "NpatchImageVisualProperty.FittingMode", NpatchImageVisualProperty.FittingMode },
115             { "NpatchImageVisualProperty.SamplingMode", NpatchImageVisualProperty.SamplingMode },
116             { "NpatchImageVisualProperty.DesiredWidth", NpatchImageVisualProperty.DesiredWidth },
117             { "NpatchImageVisualProperty.DesiredHeight", NpatchImageVisualProperty.DesiredHeight },
118             { "NpatchImageVisualProperty.SynchronousLoading", NpatchImageVisualProperty.SynchronousLoading },
119             { "NpatchImageVisualProperty.BorderOnly", NpatchImageVisualProperty.BorderOnly },
120             { "NpatchImageVisualProperty.PixelArea", NpatchImageVisualProperty.PixelArea },
121             { "NpatchImageVisualProperty.WrapModeU", NpatchImageVisualProperty.WrapModeU },
122             { "NpatchImageVisualProperty.WrapModeV", NpatchImageVisualProperty.WrapModeV },
123             { "NpatchImageVisualProperty.Border", NpatchImageVisualProperty.Border },
124             // HiddenInputProperty
125             { "HiddenInputProperty.Mode", HiddenInputProperty.Mode },
126             { "HiddenInputProperty.SubstituteCharacter", HiddenInputProperty.SubstituteCharacter },
127             { "HiddenInputProperty.SubstituteCount", HiddenInputProperty.SubstituteCount },
128             { "HiddenInputProperty.ShowLastCharacterDuration", HiddenInputProperty.ShowLastCharacterDuration },
129         };
130     }
131
132     internal enum VisualTypeExtension
133     {
134         Border = Visual.Type.Border,
135         Color = Visual.Type.Color,
136         Gradient = Visual.Type.Gradient,
137         Image = Visual.Type.Image,
138         Mesh = Visual.Type.Mesh,
139         Primitive = Visual.Type.Primitive,
140         Wireframe = Visual.Type.Wireframe,
141         Text = Visual.Type.Text,
142         NPatch = Visual.Type.NPatch,
143         SVG = Visual.Type.SVG,
144         AnimatedImage = Visual.Type.AnimatedImage
145     }
146
147     internal enum VisualAlignTypeExtension
148     {
149         TopBegin = Visual.AlignType.TopBegin,
150         TopCenter = Visual.AlignType.TopCenter,
151         TopEnd = Visual.AlignType.TopEnd,
152         CenterBegin = Visual.AlignType.CenterBegin,
153         Center = Visual.AlignType.Center,
154         CenterEnd = Visual.AlignType.CenterEnd,
155         BottomBegin = Visual.AlignType.BottomBegin,
156         BottomCenter = Visual.AlignType.BottomCenter,
157         BottomEnd = Visual.AlignType.BottomEnd
158     }
159 }