1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 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 #ifndef NODE_TRANSITION_H 16 #define NODE_TRANSITION_H 17 18 #include "animate_impl.h" 19 #include "native_node.h" 20 #include "native_type.h" 21 22 #include "frameworks/core/interfaces/arkoala/arkoala_api.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 typedef enum { 29 ARKUI_TRANSITION_EFFECT_OPACITY = 0, 30 ARKUI_TRANSITION_EFFECT_TRANSLATE, 31 ARKUI_TRANSITION_EFFECT_SCALE, 32 ARKUI_TRANSITION_EFFECT_ROTATE, 33 ARKUI_TRANSITION_EFFECT_MOVE, 34 ARKUI_TRANSITION_EFFECT_ASYMMETRIC, 35 } ArkUI_TransitionEffectType; 36 37 struct ArkUI_TransitionEffect { 38 ArkUI_TransitionEffectType type; 39 float opacity; 40 ArkUI_TranslationOptions* translate; 41 ArkUI_ScaleOptions* scale; 42 ArkUI_RotationOptions* rotate; 43 ArkUI_TransitionEdge move; 44 ArkUI_TransitionEffect* appear; 45 ArkUI_TransitionEffect* disappear; 46 ArkUI_TransitionEffect* combine; 47 ArkUI_AnimateOption* animation; 48 ArkUITransitionEffectOption* toEffectOption; 49 }; 50 51 #ifdef __cplusplus 52 }; 53 #endif 54 55 namespace OHOS::Ace::TransitionModel { 56 ArkUITransitionEffectOption* ConvertToEffectOption(ArkUI_TransitionEffect* effectOption); 57 }; // namespace OHOS::Ace::TransitionModel 58 59 #endif