1 /*
2  * Copyright (C) 2024 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 com.android.launcher3.taskbar.bubbles.flyout
18 
19 import android.graphics.PointF
20 
21 /** Provides positioning data to the flyout view. */
22 interface BubbleBarFlyoutPositioner {
23 
24     /** Whether the flyout view should be positioned on left or the right edge. */
25     val isOnLeft: Boolean
26 
27     /** The target translation Y that the flyout view should have when displayed. */
28     val targetTy: Float
29 
30     /**
31      * The distance between the expanded position of the flyout and the collapsed position.
32      *
33      * The distance is calculated between the bottom corner which is aligned with the bubble bar.
34      */
35     val distanceToCollapsedPosition: PointF
36 
37     /** The size of the flyout when collapsed. */
38     val collapsedSize: Float
39 
40     /** The color of the flyout when collapsed. */
41     val collapsedColor: Int
42 
43     /** The elevation of the flyout when collapsed. */
44     val collapsedElevation: Float
45 
46     /**
47      * The distance the flyout must pass from its collapsed position until it can start revealing
48      * the triangle.
49      */
50     val distanceToRevealTriangle: Float
51 }
52