2 * Copyright(c) 2023 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.
19 using System.ComponentModel;
20 using System.Collections.Generic;
23 namespace Tizen.NUI.Scene3D
26 /// Target value of motion. It can be define as specific PropertyValue, or KeyFrames
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class MotionValue : IDisposable
31 private IDisposable internalValue = null;
34 /// Determine whether current stored value is PropertyValue, or KeyFrames.
36 [EditorBrowsable(EditorBrowsableState.Never)]
40 /// Value is null, or invalid class.
42 [EditorBrowsable(EditorBrowsableState.Never)]
46 /// Value is PropertyValue.
48 [EditorBrowsable(EditorBrowsableState.Never)]
52 /// Value is KeyFrames.
54 [EditorBrowsable(EditorBrowsableState.Never)]
59 /// Create an initialized motion value with invalid.
61 [EditorBrowsable(EditorBrowsableState.Never)]
67 /// Get or set the value as PropertyValue type.
68 /// It will return null if value is not PropertyValue.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public PropertyValue Value
75 return internalValue as PropertyValue;
79 internalValue = (Disposable)value;
84 /// Get or set the value as KeyFrames type.
85 /// It will return null if value is not KeyFrames.
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 public KeyFrames KeyFramesValue
92 return internalValue as KeyFrames;
96 internalValue = (BaseHandle)value;
101 /// Get the type of value what we setted.
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public ValueType Type
108 if (internalValue is KeyFrames)
110 return ValueType.KeyFrames;
112 if (internalValue is PropertyValue)
114 return ValueType.Property;
116 return ValueType.Invalid;
121 /// IDisposable.Dipsose.
123 [EditorBrowsable(EditorBrowsableState.Never)]
124 public void Dispose()
126 internalValue?.Dispose();