import typing

import android.content
import android.hardware.display
import android.os
import android.view
import java
import java.lang

class MediaProjection(java.lang.Object):
    def createVirtualDisplay(self, name: str | java.lang.String, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, dpi: int | java.jint | java.lang.Integer, flags: int | java.jint | java.lang.Integer, surface: android.view.Surface, callback: android.hardware.display.VirtualDisplay.Callback, handler: android.os.Handler, /) -> android.hardware.display.VirtualDisplay | None: ...
    def registerCallback(self, callback: MediaProjection.Callback, handler: android.os.Handler, /) -> None: ...
    def stop(self) -> None: ...
    def unregisterCallback(self, callback: MediaProjection.Callback, /) -> None: ...

    class Callback(java.lang.Object):
        def __init__(self) -> None: ...
        def onCapturedContentResize(self, width: int | java.jint | java.lang.Integer, height: int | java.jint | java.lang.Integer, /) -> None: ...
        def onCapturedContentVisibilityChanged(self, isVisible: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
        def onStop(self) -> None: ...

class MediaProjectionConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[MediaProjectionConfig]] = ...
    @staticmethod
    def createConfigForDefaultDisplay() -> MediaProjectionConfig: ...
    @staticmethod
    def createConfigForUserChoice() -> MediaProjectionConfig: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class MediaProjectionManager(java.lang.Object):
    @typing.overload
    def createScreenCaptureIntent(self) -> android.content.Intent: ...
    @typing.overload
    def createScreenCaptureIntent(self, config: MediaProjectionConfig, /) -> android.content.Intent: ...
    def getMediaProjection(self, resultCode: int | java.jint | java.lang.Integer, resultData: android.content.Intent, /) -> MediaProjection | None: ...
