2023-12-03 19:58:54 -05:00

39 lines
911 B
Kotlin

package net.mezimmah.wkt9
import android.content.Intent
import android.view.KeyEvent
import net.mezimmah.wkt9.entity.Word
import net.mezimmah.wkt9.inputmode.InputMode
interface IME {
fun onTriggerKeyEvent(event: KeyEvent)
fun onStartIntent(intent: Intent)
fun onCandidates(
candidates: ArrayList<CharSequence>,
current: Int? = 0
)
fun onWords(words: List<Word>, capMode: Int?)
fun onNextWord()
fun onPreviousWord()
fun onWordSelected(word: Word)
fun onDeleteWord(word: Word)
fun onCommit(text: CharSequence = "", beforeCursor: Int = 0, afterCursor: Int = 0)
fun onCompose(text: CharSequence)
fun onDeleteText(beforeCursor: Int = 0, afterCursor: Int = 0, finishComposing: Boolean = false)
fun onGetTextBeforeCursor(n: Int): CharSequence?
fun onSwitchInputHandler(inputMode: InputMode)
fun onUpdateStatusIcon(icon: Int?)
}