"""
This type stub file was generated by pyright.
"""

import typing

import contextlib

from . import _base

display: typing.Any = ...

class XError(Exception):
    """An error that is thrown at the end of a code block managed by a
    :func:`display_manager` if an *X* error occurred.
    """

    ...

@contextlib.contextmanager
def display_manager(display: typing.Any) -> typing.Any:
    """Traps *X* errors and raises an :class:`XError` at the end if any
    error occurred.

    This handler also ensures that the :class:`Xlib.display.Display` being
    managed is sync'd.

    :param Xlib.display.Display display: The *X* display.
    """
    ...

class Icon(_base.Icon):
    _XEMBED_VERSION: typing.Any = ...
    _XEMBED_MAPPED: typing.Any = ...
    _SYSTEM_TRAY_REQUEST_DOCK: typing.Any = ...
    HAS_MENU: bool = ...
    HAS_MENU_RADIO: bool = ...
    HAS_NOTIFICATION: bool = ...
    def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: ...
    def __del__(self) -> None: ...
