import java.awt
import java.awt.font
import java.awt.im
import java.lang
import java.text
import java.util
import javax.swing
import typing



class InputMethod:
    def activate(self) -> None: ...
    def deactivate(self, boolean: bool) -> None: ...
    def dispatchEvent(self, aWTEvent: java.awt.AWTEvent) -> None: ...
    def dispose(self) -> None: ...
    def endComposition(self) -> None: ...
    def getControlObject(self) -> typing.Any: ...
    def getLocale(self) -> java.util.Locale: ...
    def hideWindows(self) -> None: ...
    def isCompositionEnabled(self) -> bool: ...
    def notifyClientWindowChange(self, rectangle: java.awt.Rectangle) -> None: ...
    def reconvert(self) -> None: ...
    def removeNotify(self) -> None: ...
    def setCharacterSubsets(self, subsetArray: typing.List[java.lang.Character.Subset]) -> None: ...
    def setCompositionEnabled(self, boolean: bool) -> None: ...
    def setInputMethodContext(self, inputMethodContext: 'InputMethodContext') -> None: ...
    def setLocale(self, locale: java.util.Locale) -> bool: ...

class InputMethodContext(java.awt.im.InputMethodRequests):
    def createInputMethodJFrame(self, string: str, boolean: bool) -> javax.swing.JFrame: ...
    def createInputMethodWindow(self, string: str, boolean: bool) -> java.awt.Window: ...
    def dispatchInputMethodEvent(self, int: int, attributedCharacterIterator: java.text.AttributedCharacterIterator, int2: int, textHitInfo: java.awt.font.TextHitInfo, textHitInfo2: java.awt.font.TextHitInfo) -> None: ...
    def enableClientWindowNotification(self, inputMethod: InputMethod, boolean: bool) -> None: ...

class InputMethodDescriptor:
    def createInputMethod(self) -> InputMethod: ...
    def getAvailableLocales(self) -> typing.List[java.util.Locale]: ...
    def getInputMethodDisplayName(self, locale: java.util.Locale, locale2: java.util.Locale) -> str: ...
    def getInputMethodIcon(self, locale: java.util.Locale) -> java.awt.Image: ...
    def hasDynamicLocaleList(self) -> bool: ...


class __module_protocol__(typing.Protocol):
    # A module protocol which reflects the result of ``jp.JPackage("java.awt.im.spi")``.

    InputMethod: typing.Type[InputMethod]
    InputMethodContext: typing.Type[InputMethodContext]
    InputMethodDescriptor: typing.Type[InputMethodDescriptor]
