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.keyboard; 18 19 import android.view.View; 20 import android.widget.PopupWindow; 21 22 public interface MoreKeysPanel extends PointerTracker.KeyEventHandler { 23 public interface Controller { 24 public boolean dismissMoreKeysPanel(); 25 } 26 27 /** 28 * Show more keys panel. 29 * 30 * @param parentView the parent view of this more keys panel 31 * @param controller the controller that can dismiss this more keys panel 32 * @param pointX x coordinate of this more keys panel 33 * @param pointY y coordinate of this more keys panel 34 * @param window PopupWindow to be used to show this more keys panel 35 * @param listener the listener that will receive keyboard action from this more keys panel. 36 */ 37 public void showMoreKeysPanel(View parentView, Controller controller, int pointX, int pointY, 38 PopupWindow window, KeyboardActionListener listener); 39 40 /** 41 * Translate X-coordinate of touch event to the local X-coordinate of this 42 * {@link MoreKeysPanel}. 43 * 44 * @param x the global X-coordinate 45 * @return the local X-coordinate to this {@link MoreKeysPanel} 46 */ 47 public int translateX(int x); 48 49 /** 50 * Translate Y-coordinate of touch event to the local Y-coordinate of this 51 * {@link MoreKeysPanel}. 52 * 53 * @param y the global Y-coordinate 54 * @return the local Y-coordinate to this {@link MoreKeysPanel} 55 */ 56 public int translateY(int y); 57 } 58