import typing

import android.app
import android.content
import android.content.pm
import android.os
import java
import java.chaquopy
import java.lang
import java.util

class PageRange(android.os.Parcelable):
    ALL_PAGES: typing.ClassVar[PageRange] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PageRange]] = ...
    def __init__(self, start: int | java.jint | java.lang.Integer, end: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getEnd(self) -> int: ...
    def getStart(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PrintAttributes(android.os.Parcelable):
    COLOR_MODE_COLOR: typing.ClassVar[int] = ...
    COLOR_MODE_MONOCHROME: typing.ClassVar[int] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrintAttributes]] = ...
    DUPLEX_MODE_LONG_EDGE: typing.ClassVar[int] = ...
    DUPLEX_MODE_NONE: typing.ClassVar[int] = ...
    DUPLEX_MODE_SHORT_EDGE: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getColorMode(self) -> int: ...
    def getDuplexMode(self) -> int: ...
    def getMediaSize(self) -> PrintAttributes.MediaSize | None: ...
    def getMinMargins(self) -> PrintAttributes.Margins | None: ...
    def getResolution(self) -> PrintAttributes.Resolution | None: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Resolution(java.lang.Object):
        def __init__(self, id: str | java.lang.String, label: str | java.lang.String, horizontalDpi: int | java.jint | java.lang.Integer, verticalDpi: int | java.jint | java.lang.Integer, /) -> None: ...
        def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getHorizontalDpi(self) -> int: ...
        def getId(self) -> str: ...
        def getLabel(self) -> str: ...
        def getVerticalDpi(self) -> int: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...

    class MediaSize(java.lang.Object):
        ANSI_C: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ANSI_D: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ANSI_E: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ANSI_F: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A0: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A10: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A7: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_A9: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B0: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B10: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B7: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_B9: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C0: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C10: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C7: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ISO_C9: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B0: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B10: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B7: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_B9: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JIS_EXEC: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_CHOU2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_CHOU3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_CHOU4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_HAGAKI: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_KAHU: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_KAKU2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_OE_PHOTO_L: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_OUFUKU: typing.ClassVar[PrintAttributes.MediaSize] = ...
        JPN_YOU4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_A: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_B: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_C: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_D: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_E1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_ARCH_E: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_FOOLSCAP: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_GOVT_LETTER: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_INDEX_3X5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_INDEX_4X6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_INDEX_5X8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_JUNIOR_LEGAL: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_LEDGER: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_LEGAL: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_LETTER: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_MONARCH: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_QUARTO: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_SUPER_B: typing.ClassVar[PrintAttributes.MediaSize] = ...
        NA_TABLOID: typing.ClassVar[PrintAttributes.MediaSize] = ...
        OM_DAI_PA_KAI: typing.ClassVar[PrintAttributes.MediaSize] = ...
        OM_JUURO_KU_KAI: typing.ClassVar[PrintAttributes.MediaSize] = ...
        OM_PA_KAI: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_10: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_16K: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_1: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_2: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_3: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_4: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_5: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_6: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_7: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_8: typing.ClassVar[PrintAttributes.MediaSize] = ...
        PRC_9: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ROC_16K: typing.ClassVar[PrintAttributes.MediaSize] = ...
        ROC_8K: typing.ClassVar[PrintAttributes.MediaSize] = ...
        UNKNOWN_LANDSCAPE: typing.ClassVar[PrintAttributes.MediaSize] = ...
        UNKNOWN_PORTRAIT: typing.ClassVar[PrintAttributes.MediaSize] = ...
        def __init__(self, id: str | java.lang.String, label: str | java.lang.String, widthMils: int | java.jint | java.lang.Integer, heightMils: int | java.jint | java.lang.Integer, /) -> None: ...
        def asLandscape(self) -> PrintAttributes.MediaSize: ...
        def asPortrait(self) -> PrintAttributes.MediaSize: ...
        def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getHeightMils(self) -> int: ...
        def getId(self) -> str: ...
        def getLabel(self, packageManager: android.content.pm.PackageManager, /) -> str: ...
        def getWidthMils(self) -> int: ...
        def hashCode(self) -> int: ...
        def isPortrait(self) -> bool: ...
        def toString(self) -> str: ...

    class Margins(java.lang.Object):
        NO_MARGINS: typing.ClassVar[PrintAttributes.Margins] = ...
        def __init__(self, leftMils: int | java.jint | java.lang.Integer, topMils: int | java.jint | java.lang.Integer, rightMils: int | java.jint | java.lang.Integer, bottomMils: int | java.jint | java.lang.Integer, /) -> None: ...
        def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getBottomMils(self) -> int: ...
        def getLeftMils(self) -> int: ...
        def getRightMils(self) -> int: ...
        def getTopMils(self) -> int: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> PrintAttributes: ...
        def setColorMode(self, colorMode: int | java.jint | java.lang.Integer, /) -> PrintAttributes.Builder: ...
        def setDuplexMode(self, duplexMode: int | java.jint | java.lang.Integer, /) -> PrintAttributes.Builder: ...
        def setMediaSize(self, mediaSize: PrintAttributes.MediaSize, /) -> PrintAttributes.Builder: ...
        def setMinMargins(self, margins: PrintAttributes.Margins, /) -> PrintAttributes.Builder: ...
        def setResolution(self, resolution: PrintAttributes.Resolution, /) -> PrintAttributes.Builder: ...

class PrintDocumentAdapter(java.lang.Object):
    EXTRA_PRINT_PREVIEW: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def onFinish(self) -> None: ...
    def onLayout(self, arg1: PrintAttributes, arg2: PrintAttributes, arg3: android.os.CancellationSignal, arg4: PrintDocumentAdapter.LayoutResultCallback, arg5: android.os.Bundle, /) -> None: ...
    def onStart(self) -> None: ...
    def onWrite(self, arg1: java.chaquopy.JavaArray[PageRange], arg2: android.os.ParcelFileDescriptor, arg3: android.os.CancellationSignal, arg4: PrintDocumentAdapter.WriteResultCallback, /) -> None: ...

    class WriteResultCallback(java.lang.Object):
        def onWriteCancelled(self) -> None: ...
        def onWriteFailed(self, error: java.lang.CharSequence, /) -> None: ...
        def onWriteFinished(self, pages: java.chaquopy.JavaArray[PageRange], /) -> None: ...

    class LayoutResultCallback(java.lang.Object):
        def onLayoutCancelled(self) -> None: ...
        def onLayoutFailed(self, error: java.lang.CharSequence, /) -> None: ...
        def onLayoutFinished(self, info: PrintDocumentInfo, changed: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class PrintDocumentInfo(android.os.Parcelable):
    CONTENT_TYPE_DOCUMENT: typing.ClassVar[int] = ...
    CONTENT_TYPE_PHOTO: typing.ClassVar[int] = ...
    CONTENT_TYPE_UNKNOWN: typing.ClassVar[int] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrintDocumentInfo]] = ...
    PAGE_COUNT_UNKNOWN: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getContentType(self) -> int: ...
    def getDataSize(self) -> int: ...
    def getName(self) -> str: ...
    def getPageCount(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, name: str | java.lang.String, /) -> None: ...
        def build(self) -> PrintDocumentInfo: ...
        def setContentType(self, type: int | java.jint | java.lang.Integer, /) -> PrintDocumentInfo.Builder: ...
        def setPageCount(self, pageCount: int | java.jint | java.lang.Integer, /) -> PrintDocumentInfo.Builder: ...

class PrintJob(java.lang.Object):
    def cancel(self) -> None: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getId(self) -> PrintJobId | None: ...
    def getInfo(self) -> PrintJobInfo: ...
    def hashCode(self) -> int: ...
    def isBlocked(self) -> bool: ...
    def isCancelled(self) -> bool: ...
    def isCompleted(self) -> bool: ...
    def isFailed(self) -> bool: ...
    def isQueued(self) -> bool: ...
    def isStarted(self) -> bool: ...
    def restart(self) -> None: ...

class PrintJobId(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrintJobId]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PrintJobInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrintJobInfo]] = ...
    STATE_BLOCKED: typing.ClassVar[int] = ...
    STATE_CANCELED: typing.ClassVar[int] = ...
    STATE_COMPLETED: typing.ClassVar[int] = ...
    STATE_CREATED: typing.ClassVar[int] = ...
    STATE_FAILED: typing.ClassVar[int] = ...
    STATE_QUEUED: typing.ClassVar[int] = ...
    STATE_STARTED: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getAdvancedIntOption(self, key: str | java.lang.String, /) -> int: ...
    def getAdvancedStringOption(self, key: str | java.lang.String, /) -> str: ...
    def getAttributes(self) -> PrintAttributes: ...
    def getCopies(self) -> int: ...
    def getCreationTime(self) -> int: ...
    def getId(self) -> PrintJobId | None: ...
    def getLabel(self) -> str: ...
    def getPages(self) -> java.chaquopy.JavaArray[PageRange] | None: ...
    def getPrinterId(self) -> PrinterId | None: ...
    def getState(self) -> int: ...
    def hasAdvancedOption(self, key: str | java.lang.String, /) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, prototype: PrintJobInfo, /) -> None: ...
        def build(self) -> PrintJobInfo: ...
        @typing.overload
        def putAdvancedOption(self, key: str | java.lang.String, value: int | java.jint | java.lang.Integer, /) -> None: ...
        @typing.overload
        def putAdvancedOption(self, key: str | java.lang.String, value: str | java.lang.String, /) -> None: ...
        def setAttributes(self, attributes: PrintAttributes, /) -> None: ...
        def setCopies(self, copies: int | java.jint | java.lang.Integer, /) -> None: ...
        def setPages(self, pages: java.chaquopy.JavaArray[PageRange], /) -> None: ...

class PrintManager(java.lang.Object):
    def getPrintJobs(self) -> java.util.List[PrintJob]: ...
    def isPrintServiceEnabled(self, service: android.content.ComponentName, /) -> bool: ...
    def print_(self, printJobName: str | java.lang.String, documentAdapter: PrintDocumentAdapter, attributes: PrintAttributes, /) -> PrintJob | None: ...

class PrinterCapabilitiesInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrinterCapabilitiesInfo]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getColorModes(self) -> int: ...
    def getDefaults(self) -> PrintAttributes: ...
    def getDuplexModes(self) -> int: ...
    def getMediaSizes(self) -> java.util.List[PrintAttributes.MediaSize]: ...
    def getMinMargins(self) -> PrintAttributes.Margins: ...
    def getResolutions(self) -> java.util.List[PrintAttributes.Resolution]: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, printerId: PrinterId, /) -> None: ...
        def addMediaSize(self, mediaSize: PrintAttributes.MediaSize, isDefault: bool | java.jboolean | java.lang.Boolean, /) -> PrinterCapabilitiesInfo.Builder: ...
        def addResolution(self, resolution: PrintAttributes.Resolution, isDefault: bool | java.jboolean | java.lang.Boolean, /) -> PrinterCapabilitiesInfo.Builder: ...
        def build(self) -> PrinterCapabilitiesInfo: ...
        def setColorModes(self, colorModes: int | java.jint | java.lang.Integer, defaultColorMode: int | java.jint | java.lang.Integer, /) -> PrinterCapabilitiesInfo.Builder: ...
        def setDuplexModes(self, duplexModes: int | java.jint | java.lang.Integer, defaultDuplexMode: int | java.jint | java.lang.Integer, /) -> PrinterCapabilitiesInfo.Builder: ...
        def setMinMargins(self, margins: PrintAttributes.Margins, /) -> PrinterCapabilitiesInfo.Builder: ...

class PrinterId(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrinterId]] = ...
    def describeContents(self) -> int: ...
    def equals(self, object: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getLocalId(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PrinterInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PrinterInfo]] = ...
    STATUS_BUSY: typing.ClassVar[int] = ...
    STATUS_IDLE: typing.ClassVar[int] = ...
    STATUS_UNAVAILABLE: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCapabilities(self) -> PrinterCapabilitiesInfo | None: ...
    def getDescription(self) -> str | None: ...
    def getId(self) -> PrinterId: ...
    def getName(self) -> str: ...
    def getStatus(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, other: PrinterInfo, /) -> None: ...
        @typing.overload
        def __init__(self, printerId: PrinterId, name: str | java.lang.String, status: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> PrinterInfo: ...
        def setCapabilities(self, capabilities: PrinterCapabilitiesInfo, /) -> PrinterInfo.Builder: ...
        def setDescription(self, description: str | java.lang.String, /) -> PrinterInfo.Builder: ...
        def setHasCustomPrinterIcon(self, hasCustomPrinterIcon: bool | java.jboolean | java.lang.Boolean, /) -> PrinterInfo.Builder: ...
        def setIconResourceId(self, iconResourceId: int | java.jint | java.lang.Integer, /) -> PrinterInfo.Builder: ...
        def setInfoIntent(self, infoIntent: android.app.PendingIntent, /) -> PrinterInfo.Builder: ...
        def setName(self, name: str | java.lang.String, /) -> PrinterInfo.Builder: ...
        def setStatus(self, status: int | java.jint | java.lang.Integer, /) -> PrinterInfo.Builder: ...
