1 /* 2 * Copyright (C) 2022 The Android Open Source Project 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 package androidx.constraintlayout.core.state; 18 19 /** 20 * This defines the interface to motionScene functionality 21 */ 22 public interface CoreMotionScene { 23 24 /** 25 * set the Transitions string onto the MotionScene 26 * 27 * @param elementName the name of the element 28 * @param toJSON the json string of the transitioncontent 29 */ setTransitionContent(String elementName, String toJSON)30 void setTransitionContent(String elementName, String toJSON); 31 32 /** 33 * Get the ConstraintSet as a string 34 */ getConstraintSet(String ext)35 String getConstraintSet(String ext); 36 37 /** 38 * set the constraintSet json string 39 * 40 * @param csName the name of the constraint set 41 * @param toJSON the json string of the constraintset 42 */ setConstraintSetContent(String csName, String toJSON)43 void setConstraintSetContent(String csName, String toJSON); 44 45 /** 46 * set the debug name for remote access 47 * 48 * @param name name to call this motion scene 49 */ setDebugName(String name)50 void setDebugName(String name); 51 52 /** 53 * get a transition give the name 54 * 55 * @param str the name of the transition 56 * @return the json of the transition 57 */ getTransition(String str)58 String getTransition(String str); 59 60 /** 61 * get a constraintset 62 * 63 * @param index of the constraintset 64 */ getConstraintSet(int index)65 String getConstraintSet(int index); 66 } 67