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 com.android.inputmethod.accessibility; 18 19 public interface AccessibleKeyboardActionListener { 20 /** 21 * Called when the user hovers inside a key. This is sent only when 22 * Accessibility is turned on. For keys that repeat, this is only called 23 * once. 24 * 25 * @param primaryCode the code of the key that was hovered over 26 */ onHoverEnter(int primaryCode)27 public void onHoverEnter(int primaryCode); 28 29 /** 30 * Called when the user hovers outside a key. This is sent only when 31 * Accessibility is turned on. For keys that repeat, this is only called 32 * once. 33 * 34 * @param primaryCode the code of the key that was hovered over 35 */ onHoverExit(int primaryCode)36 public void onHoverExit(int primaryCode); 37 38 /** 39 * @param direction the direction of the flick gesture, one of 40 * <ul> 41 * <li>{@link FlickGestureDetector#FLICK_UP} 42 * <li>{@link FlickGestureDetector#FLICK_DOWN} 43 * <li>{@link FlickGestureDetector#FLICK_LEFT} 44 * <li>{@link FlickGestureDetector#FLICK_RIGHT} 45 * </ul> 46 */ onFlickGesture(int direction)47 public void onFlickGesture(int direction); 48 } 49