import typing

import android.content
import android.content.pm
import android.graphics.drawable
import android.os
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent

class SentenceSuggestionsInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SentenceSuggestionsInfo]] = ...
    @typing.overload
    def __init__(self, source: android.os.Parcel, /) -> None: ...
    @typing.overload
    def __init__(self, suggestionsInfos: java.chaquopy.JavaArray[SuggestionsInfo], offsets: java.chaquopy.JavaArrayJInt, lengths: java.chaquopy.JavaArrayJInt, /) -> None: ...
    def describeContents(self) -> int: ...
    def getLengthAt(self, i: int | java.jint | java.lang.Integer, /) -> int: ...
    def getOffsetAt(self, i: int | java.jint | java.lang.Integer, /) -> int: ...
    def getSuggestionsCount(self) -> int: ...
    def getSuggestionsInfoAt(self, i: int | java.jint | java.lang.Integer, /) -> SuggestionsInfo: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class SpellCheckerInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SpellCheckerInfo]] = ...
    def describeContents(self) -> int: ...
    def getComponent(self) -> android.content.ComponentName: ...
    def getId(self) -> str: ...
    def getPackageName(self) -> str: ...
    def getServiceInfo(self) -> android.content.pm.ServiceInfo: ...
    def getSettingsActivity(self) -> str: ...
    def getSubtypeAt(self, index: int | java.jint | java.lang.Integer, /) -> SpellCheckerSubtype: ...
    def getSubtypeCount(self) -> int: ...
    def loadIcon(self, pm: android.content.pm.PackageManager, /) -> android.graphics.drawable.Drawable: ...
    def loadLabel(self, pm: android.content.pm.PackageManager, /) -> java.lang.CharSequence: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class SpellCheckerSession(java.lang.Object):
    SERVICE_META_DATA: typing.ClassVar[str] = ...
    def cancel(self) -> None: ...
    def close(self) -> None: ...
    def finalize(self) -> None: ...
    def getSentenceSuggestions(self, textInfos: java.chaquopy.JavaArray[TextInfo], suggestionsLimit: int | java.jint | java.lang.Integer, /) -> None: ...
    def getSpellChecker(self) -> SpellCheckerInfo: ...
    @typing.overload
    def getSuggestions(self, textInfo: TextInfo, suggestionsLimit: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def getSuggestions(self, textInfos: java.chaquopy.JavaArray[TextInfo], suggestionsLimit: int | java.jint | java.lang.Integer, sequentialWords: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def isSessionDisconnected(self) -> bool: ...

    class SpellCheckerSessionParams(java.lang.Object):
        def getExtras(self) -> android.os.Bundle: ...
        def getLocale(self) -> java.util.Locale: ...
        def getSupportedAttributes(self) -> int: ...
        def shouldReferToSpellCheckerLanguageSettings(self) -> bool: ...

        class Builder(java.lang.Object):
            def __init__(self) -> None: ...
            def build(self) -> SpellCheckerSession.SpellCheckerSessionParams: ...
            def setExtras(self, extras: android.os.Bundle, /) -> SpellCheckerSession.SpellCheckerSessionParams.Builder: ...
            def setLocale(self, locale: java.util.Locale, /) -> SpellCheckerSession.SpellCheckerSessionParams.Builder: ...
            def setShouldReferToSpellCheckerLanguageSettings(self, shouldReferToSpellCheckerLanguageSettings: bool | java.jboolean | java.lang.Boolean, /) -> SpellCheckerSession.SpellCheckerSessionParams.Builder: ...
            def setSupportedAttributes(self, supportedAttributes: int | java.jint | java.lang.Integer, /) -> SpellCheckerSession.SpellCheckerSessionParams.Builder: ...

    class SpellCheckerSessionListener(java.lang.Object):
        def onGetSentenceSuggestions(self, arg1: java.chaquopy.JavaArray[SentenceSuggestionsInfo], /) -> None: ...
        def onGetSuggestions(self, arg1: java.chaquopy.JavaArray[SuggestionsInfo], /) -> None: ...

class SpellCheckerSubtype(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SpellCheckerSubtype]] = ...
    def __init__(self, nameId: int | java.jint | java.lang.Integer, locale: str | java.lang.String, extraValue: str | java.lang.String, /) -> None: ...
    def containsExtraValueKey(self, key: str | java.lang.String, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDisplayName(self, context: android.content.Context, packageName: str | java.lang.String, appInfo: android.content.pm.ApplicationInfo, /) -> java.lang.CharSequence: ...
    def getExtraValue(self) -> str: ...
    def getExtraValueOf(self, key: str | java.lang.String, /) -> str: ...
    def getLanguageTag(self) -> str: ...
    def getLocale(self) -> str: ...
    def getNameResId(self) -> int: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, parcelableFlags: int | java.jint | java.lang.Integer, /) -> None: ...

class SuggestionsInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SuggestionsInfo]] = ...
    RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS: typing.ClassVar[int] = ...
    RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS: typing.ClassVar[int] = ...
    RESULT_ATTR_IN_THE_DICTIONARY: typing.ClassVar[int] = ...
    RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR: typing.ClassVar[int] = ...
    RESULT_ATTR_LOOKS_LIKE_TYPO: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, source: android.os.Parcel, /) -> None: ...
    @typing.overload
    def __init__(self, suggestionsAttributes: int | java.jint | java.lang.Integer, suggestions: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    @typing.overload
    def __init__(self, suggestionsAttributes: int | java.jint | java.lang.Integer, suggestions: java.chaquopy.JavaArray[java.lang.String], cookie: int | java.jint | java.lang.Integer, sequence: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def getCookie(self) -> int: ...
    def getSequence(self) -> int: ...
    def getSuggestionAt(self, i: int | java.jint | java.lang.Integer, /) -> str: ...
    def getSuggestionsAttributes(self) -> int: ...
    def getSuggestionsCount(self) -> int: ...
    def setCookieAndSequence(self, cookie: int | java.jint | java.lang.Integer, sequence: int | java.jint | java.lang.Integer, /) -> None: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TextInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TextInfo]] = ...
    @typing.overload
    def __init__(self, source: android.os.Parcel, /) -> None: ...
    @typing.overload
    def __init__(self, text: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, text: str | java.lang.String, cookie: int | java.jint | java.lang.Integer, sequenceNumber: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, charSequence: java.lang.CharSequence, start: int | java.jint | java.lang.Integer, end: int | java.jint | java.lang.Integer, cookie: int | java.jint | java.lang.Integer, sequenceNumber: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def getCharSequence(self) -> java.lang.CharSequence: ...
    def getCookie(self) -> int: ...
    def getSequence(self) -> int: ...
    def getText(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TextServicesManager(java.lang.Object):
    def getCurrentSpellCheckerInfo(self) -> SpellCheckerInfo | None: ...
    def getEnabledSpellCheckerInfos(self) -> java.util.List[SpellCheckerInfo]: ...
    def isSpellCheckerEnabled(self) -> bool: ...
    @typing.overload
    def newSpellCheckerSession(self, params: SpellCheckerSession.SpellCheckerSessionParams, executor: java.util.concurrent.Executor, listener: SpellCheckerSession.SpellCheckerSessionListener, /) -> SpellCheckerSession | None: ...
    @typing.overload
    def newSpellCheckerSession(self, bundle: android.os.Bundle, locale: java.util.Locale, listener: SpellCheckerSession.SpellCheckerSessionListener, referToSpellCheckerLanguageSettings: bool | java.jboolean | java.lang.Boolean, /) -> SpellCheckerSession | None: ...
