• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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.wm.shell.windowdecor;
18 
19 /**
20  * Holds the state of a drag resize.
21  */
22 public interface TaskDragResizer {
23 
24     /**
25      * Returns true if task is currently being resized or animating the final transition after
26      * a resize is complete.
27      */
isResizingOrAnimating()28     boolean isResizingOrAnimating();
29 
30     /**
31      * Adds a drag start listener to be notified of drag start events.
32      *
33      * @param dragEventListener Listener to be added.
34      */
addDragEventListener(DragPositioningCallbackUtility.DragEventListener dragEventListener)35     void addDragEventListener(DragPositioningCallbackUtility.DragEventListener dragEventListener);
36 
37     /**
38      * Removes a drag start listener from the listener set.
39      *
40      * @param dragEventListener Listener to be removed.
41      */
removeDragEventListener( DragPositioningCallbackUtility.DragEventListener dragEventListener)42     void removeDragEventListener(
43             DragPositioningCallbackUtility.DragEventListener dragEventListener);
44 
45     /**
46      * Releases any resources associated with this TaskDragResizer. This should be called when the
47      * associated window is closed.
48      */
close()49     void close();
50 }
51