Home | History | Annotate | Download | only in accessibility
      1 /*
      2  * Copyright (C) 2011 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 android.view.accessibility;
     18 
     19 import android.graphics.Point;
     20 import android.view.accessibility.AccessibilityNodeInfo;
     21 import java.util.List;
     22 
     23 /**
     24  * Callback for specifying the result for an asynchronous request made
     25  * via calling a method on IAccessibilityInteractionConnectionCallback.
     26  *
     27  * @hide
     28  */
     29 oneway interface IAccessibilityInteractionConnectionCallback {
     30 
     31     /**
     32      * Sets the result of an async request that returns an {@link AccessibilityNodeInfo}.
     33      *
     34      * @param infos The result {@link AccessibilityNodeInfo}.
     35      * @param interactionId The interaction id to match the result with the request.
     36      */
     37     void setFindAccessibilityNodeInfoResult(in AccessibilityNodeInfo info, int interactionId);
     38 
     39     /**
     40      * Sets the result of an async request that returns {@link AccessibilityNodeInfo}s.
     41      *
     42      * @param infos The result {@link AccessibilityNodeInfo}s.
     43      * @param interactionId The interaction id to match the result with the request.
     44      */
     45     void setFindAccessibilityNodeInfosResult(in List<AccessibilityNodeInfo> infos,
     46         int interactionId);
     47 
     48     /**
     49      * Sets the result of a request to perform an accessibility action.
     50      *
     51      * @param Whether the action was performed.
     52      * @param interactionId The interaction id to match the result with the request.
     53      */
     54     void setPerformAccessibilityActionResult(boolean succeeded, int interactionId);
     55 
     56     /**
     57      * Sets the result of a request to compute a point for clicking in a view.
     58      *
     59      * @param point The point of null if no such point.
     60      * @param interactionId The interaction id to match the result with the request.
     61      */
     62     void setComputeClickPointInScreenActionResult(in Point point, int interactionId);
     63 }
     64