"""noVNC Client - Python 客户端库用于连接 noVNC WebSocket 服务

这个库提供了一个简单易用的异步接口来连接和控制通过 noVNC 暴露的 VNC 服务。

Basic usage:
    >>> import asyncio
    >>> from novnc_client import NoVNCClient
    >>>
    >>> async def main():
    ...     async with NoVNCClient('localhost', 6080) as client:
    ...         # 截图
    ...         await client.take_screenshot('screenshot.png')
    ...
    ...         # 鼠标操作
    ...         await client.mouse_click(100, 100)
    ...         await client.mouse_scroll(200, 200, 'up', steps=3)
    ...
    ...         # 获取屏幕信息
    ...         width, height = client.screen_size
    ...         print(f"屏幕尺寸: {width}x{height}")
    >>>
    >>> asyncio.run(main())

Classes:
    NoVNCClient: 主要的客户端类

Types:
    ServerInfo: 服务器信息
    PixelFormat: 像素格式信息
    Rectangle: 矩形区域

Exceptions:
    NoVNCClientError: 基础异常
    ConnectionError: 连接异常
    HandshakeError: 握手异常
    AuthenticationError: 认证异常
    ProtocolError: 协议异常
    FramebufferError: 帧缓冲区异常
    InputError: 输入异常
    ScreenshotError: 截图异常
"""

__version__ = "0.1.0"
__author__ = "Haskely"
__email__ = "Haskely@live.com"

# 主要类
from .client import NoVNCClient

# 类型定义
from .types import (
    ServerInfo,
    PixelFormat,
    Rectangle,
    MouseButton,
    ScrollDirection,
    ConnectionConfig,
)

# 异常
from .exceptions import (
    NoVNCClientError,
    ConnectionError,
    HandshakeError,
    AuthenticationError,
    ProtocolError,
    FramebufferError,
    InputError,
    ScreenshotError,
)

# 协议相关
from .protocol import RFBProtocol

__all__ = [
    # 主要类
    "NoVNCClient",
    # 类型
    "ServerInfo",
    "PixelFormat",
    "Rectangle",
    "MouseButton",
    "ScrollDirection",
    "ConnectionConfig",
    # 异常
    "NoVNCClientError",
    "ConnectionError",
    "HandshakeError",
    "AuthenticationError",
    "ProtocolError",
    "FramebufferError",
    "InputError",
    "ScreenshotError",
    # 协议
    "RFBProtocol",
]


def hello() -> str:
    """返回欢迎消息 - 兼容原有接口"""
    return f"Hello from novnc-client v{__version__}!"
