2015-10-25 14:27:32 +00:00
|
|
|
package com.termux.view;
|
|
|
|
|
|
|
|
import android.view.MotionEvent;
|
|
|
|
import android.view.ScaleGestureDetector;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Input and scale listener which may be set on a {@link TerminalView} through
|
|
|
|
* {@link TerminalView#setOnKeyListener(TerminalKeyListener)}.
|
2015-12-23 00:43:41 +00:00
|
|
|
*
|
|
|
|
* TODO: Rename to TerminalViewClient.
|
2015-10-25 14:27:32 +00:00
|
|
|
*/
|
|
|
|
public interface TerminalKeyListener {
|
|
|
|
|
|
|
|
/** Callback function on scale events according to {@link ScaleGestureDetector#getScaleFactor()}. */
|
|
|
|
float onScale(float scale);
|
|
|
|
|
|
|
|
/** On a single tap on the terminal if terminal mouse reporting not enabled. */
|
|
|
|
void onSingleTapUp(MotionEvent e);
|
|
|
|
|
2015-12-23 00:43:41 +00:00
|
|
|
boolean shouldBackButtonBeMappedToEscape();
|
|
|
|
|
2016-01-13 02:00:21 +00:00
|
|
|
void copyModeChanged(boolean copyMode);
|
|
|
|
|
2015-10-25 14:27:32 +00:00
|
|
|
}
|