import typing

import android.os
import android.view
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent

class DeviceProductInfo(android.os.Parcelable):
    CONNECTION_TO_SINK_BUILT_IN: typing.ClassVar[int] = ...
    CONNECTION_TO_SINK_DIRECT: typing.ClassVar[int] = ...
    CONNECTION_TO_SINK_TRANSITIVE: typing.ClassVar[int] = ...
    CONNECTION_TO_SINK_UNKNOWN: typing.ClassVar[int] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DeviceProductInfo]] = ...
    def __init__(self, name: str | java.lang.String, manufacturerPnpId: str | java.lang.String, productId: str | java.lang.String, modelYear: int | java.jint | java.lang.Integer, connectionToSinkType: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getConnectionToSinkType(self) -> int: ...
    def getManufactureWeek(self) -> int: ...
    def getManufactureYear(self) -> int: ...
    def getManufacturerPnpId(self) -> str: ...
    def getModelYear(self) -> int: ...
    def getName(self) -> str | None: ...
    def getProductId(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class DisplayManager(java.lang.Object):
    DISPLAY_CATEGORY_PRESENTATION: typing.ClassVar[str] = ...
    EVENT_TYPE_DISPLAY_ADDED: typing.ClassVar[int] = ...
    EVENT_TYPE_DISPLAY_CHANGED: typing.ClassVar[int] = ...
    EVENT_TYPE_DISPLAY_REFRESH_RATE: typing.ClassVar[int] = ...
    EVENT_TYPE_DISPLAY_REMOVED: typing.ClassVar[int] = ...
    EVENT_TYPE_DISPLAY_STATE: typing.ClassVar[int] = ...
    MATCH_CONTENT_FRAMERATE_ALWAYS: typing.ClassVar[int] = ...
    MATCH_CONTENT_FRAMERATE_NEVER: typing.ClassVar[int] = ...
    MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY: typing.ClassVar[int] = ...
    MATCH_CONTENT_FRAMERATE_UNKNOWN: typing.ClassVar[int] = ...
    VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR: typing.ClassVar[int] = ...
    VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY: typing.ClassVar[int] = ...
    VIRTUAL_DISPLAY_FLAG_PRESENTATION: typing.ClassVar[int] = ...
    VIRTUAL_DISPLAY_FLAG_PUBLIC: typing.ClassVar[int] = ...
    VIRTUAL_DISPLAY_FLAG_SECURE: typing.ClassVar[int] = ...
    @typing.overload
    def createVirtualDisplay(self, config: VirtualDisplayConfig, /) -> VirtualDisplay | None: ...
    @typing.overload
    def createVirtualDisplay(self, config: VirtualDisplayConfig, handler: android.os.Handler, callback: VirtualDisplay.Callback, /) -> VirtualDisplay | None: ...
    @typing.overload
    def createVirtualDisplay(self, name: str | java.lang.String, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, densityDpi: int | java.jint | java.lang.Integer, surface: android.view.Surface, flags: int | java.jint | java.lang.Integer, /) -> VirtualDisplay | None: ...
    @typing.overload
    def createVirtualDisplay(self, name: str | java.lang.String, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, densityDpi: int | java.jint | java.lang.Integer, surface: android.view.Surface, flags: int | java.jint | java.lang.Integer, callback: VirtualDisplay.Callback, handler: android.os.Handler, /) -> VirtualDisplay | None: ...
    def getDisplay(self, displayId: int | java.jint | java.lang.Integer, /) -> android.view.Display | None: ...
    @typing.overload
    def getDisplays(self) -> java.chaquopy.JavaArray[android.view.Display]: ...
    @typing.overload
    def getDisplays(self, category: str | java.lang.String, /) -> java.chaquopy.JavaArray[android.view.Display]: ...
    def getHdrConversionMode(self) -> HdrConversionMode: ...
    def getMatchContentFrameRateUserPreference(self) -> int: ...
    @typing.overload
    def registerDisplayListener(self, listener: DisplayManager.DisplayListener, handler: android.os.Handler, /) -> None: ...
    @typing.overload
    def registerDisplayListener(self, executor: java.util.concurrent.Executor, eventFilter: int | java.jlong | java.lang.Long, listener: DisplayManager.DisplayListener, /) -> None: ...
    def unregisterDisplayListener(self, listener: DisplayManager.DisplayListener, /) -> None: ...

    class DisplayListener(java.lang.Object):
        def onDisplayAdded(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...
        def onDisplayChanged(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...
        def onDisplayRemoved(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...

class HdrConversionMode(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[HdrConversionMode]] = ...
    HDR_CONVERSION_FORCE: typing.ClassVar[int] = ...
    HDR_CONVERSION_PASSTHROUGH: typing.ClassVar[int] = ...
    HDR_CONVERSION_SYSTEM: typing.ClassVar[int] = ...
    HDR_CONVERSION_UNSUPPORTED: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, conversionMode: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, conversionMode: int | java.jint | java.lang.Integer, preferredHdrOutputType: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getConversionMode(self) -> int: ...
    def getPreferredHdrOutputType(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class VirtualDisplay(java.lang.Object):
    def getDisplay(self) -> android.view.Display: ...
    def getSurface(self) -> android.view.Surface: ...
    def release(self) -> None: ...
    def resize(self, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, densityDpi: int | java.jint | java.lang.Integer, /) -> None: ...
    def setRotation(self, rotation: int | java.jint | java.lang.Integer, /) -> None: ...
    def setSurface(self, surface: android.view.Surface, /) -> None: ...
    def toString(self) -> str: ...

    class Callback(java.lang.Object):
        def __init__(self) -> None: ...
        def onPaused(self) -> None: ...
        def onResumed(self) -> None: ...
        def onStopped(self) -> None: ...

class VirtualDisplayConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[VirtualDisplayConfig]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDefaultBrightness(self) -> float: ...
    def getDensityDpi(self) -> int: ...
    def getDimBrightness(self) -> float: ...
    def getDisplayCategories(self) -> java.util.Set[java.lang.String]: ...
    def getFlags(self) -> int: ...
    def getHeight(self) -> int: ...
    def getName(self) -> str: ...
    def getRequestedRefreshRate(self) -> float: ...
    def getSurface(self) -> android.view.Surface | None: ...
    def getWidth(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, name: str | java.lang.String, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, densityDpi: int | java.jint | java.lang.Integer, /) -> None: ...
        def addDisplayCategory(self, displayCategory: str | java.lang.String, /) -> VirtualDisplayConfig.Builder: ...
        def build(self) -> VirtualDisplayConfig: ...
        def setBrightnessListener(self, executor: java.util.concurrent.Executor, listener: VirtualDisplayConfig.BrightnessListener, /) -> VirtualDisplayConfig.Builder: ...
        def setDefaultBrightness(self, brightness: float | java.jfloat | java.lang.Float, /) -> VirtualDisplayConfig.Builder: ...
        def setDimBrightness(self, brightness: float | java.jfloat | java.lang.Float, /) -> VirtualDisplayConfig.Builder: ...
        def setDisplayCategories(self, displayCategories: java.util.Set[java.lang.String], /) -> VirtualDisplayConfig.Builder: ...
        def setFlags(self, flags: int | java.jint | java.lang.Integer, /) -> VirtualDisplayConfig.Builder: ...
        def setRequestedRefreshRate(self, requestedRefreshRate: float | java.jfloat | java.lang.Float, /) -> VirtualDisplayConfig.Builder: ...
        def setSurface(self, surface: android.view.Surface, /) -> VirtualDisplayConfig.Builder: ...

    class BrightnessListener(java.lang.Object):
        def onBrightnessChanged(self, arg1: float | java.jfloat | java.lang.Float, /) -> None: ...
