Pwry
Classes
-
class USize
-
def __init__(
self, width: int, height: int
)
-
-
class DSize
-
def __init__(
self, width: float, height: float
)
-
-
class Size
-
def __init__(
self, width: Union[int, float], height: Union[int, float]
) -> NoneCreates a Size instance. Depending on the value type: - If an int is provided, creates an USize. - If a float is provided, creates a DSize
-
def USize(
cls, size: USize
) -> SizeCreates a Size instance with the USize variant
-
def DSize(
cls, size: DSize
) -> SizeCreates a Size instance with the DSize variant
-
def __repr__(
self
) -> strReturns a string representation of the Size instance
-
def __eq__(
self, other: object
) -> boolCompares two Size instances for equality
-
-
class Unit
-
def __init__(
self, value: Union[int, float]
) -> NoneCreates a Unit instance. Depending on the value type: - If an int is provided, creates an IUnit. - If a float is provided, creates a DUnit
-
def IUnit(
cls, value: int
) -> UnitCreates a Unit instance with the IUnit variant
-
def DUnit(
cls, value: float
) -> UnitCreates a Unit instance with the DUnit variant
-
def __repr__(
self
) -> strReturns a string representation of the Unit instance
-
def __eq__(
self, other: object
) -> boolCompares two Unit instances for equality
-
-
class WindowSizeConstraints
-
def __init__(
self, min_height: Optional[Unit], min_width: Optional[Unit], max_height: Optional[Unit], max_width: Optional[Unit]
)
-
-
class IPosition
-
def __init__(
self, x: int, y: int
)
-
-
class DPosition
-
def __init__(
self, x: float, y: float
)
-
-
class Position
-
def __init__(
self, x: Union[int, float], y: Union[int, float]
) -> NoneCreates a Position instance. Depending on the value type: - If an int is provided, creates an IPosition. - If a float is provided, creates a DPosition
-
def IPosition(
cls, position: IPosition
) -> PositionCreates a Position instance with the IPosition variant
-
def DPosition(
cls, position: IPosition
) -> PositionCreates a Position instance with the DPosition variant
-
def __repr__(
self
) -> strReturns a string representation of the Position instance
-
def __eq__(
self, other: object
) -> boolCompares two Position instances for equality
-
-
class Fullscreen
-
class WindowAttributes
-
def __init__(
self, title: str, inner_size_constraints: WindowSizeConstraints, inner_size: Optional[Size], position: Optional[Position], resizable: bool, minimizable: bool, maximizable: bool, closable: bool, fullscreen: Optional[Fullscreen], maximized: bool, visible: bool, transparent: bool, decorations: bool, always_on_top: bool, always_on_bottom: bool, window_icon: Optional[str], focused: bool, content_protection: bool, visible_on_all_workspaces: bool, background_color: Optional[str]
)
-
-
class Window
-
def __init__(
self, attributes: WindowAttributes
) -
def build(
self
) -
def add_webview(
self, attributes: WebViewAttributes
) -
def get_handler(
self
) -> WindowHandler
-
-
class Rect
-
def __init__(
self, position: Position, size: Size
)
-
-
class Protocol
-
def __init__(
self, name: str, path: str
)
-
-
class WebViewAttributes
-
def __init__(
self, id: Optional[str], data_directory: Optional[str], user_agent: Optional[str], visible: bool, transparent: bool, background_color: Optional[str], url: Optional[str], headers: Optional[Dict[str, str]], html: Optional[str], clipboard: bool, devtools: bool, accept_first_mouse: bool, back_forward_navigation_gestures: bool, incognito: bool, autoplay: bool, focused: bool, bounds: Optional[Rect], protocol: Optional[Protocol]
)
-
-
class IpcRequest
-
def __init__(
self, id: str, webview_id: str, method: str, params: str
) -> None
-
-
class IpcError
-
def __init__(
self, code: int, message: str, data: Optional[str]
) -> None
-
-
class IpcResponse
-
def __init__(
self, id: str, webview_id: str, result: Optional[str], error: Optional[IpcError]
) -> None
-
-
class WindowHandler
-
def send_task(
self, webview_id: str, name: str, parameters: Optional[Dict[str, str]]
) -
def stop(
self
) -
def is_running(
self
) -> bool -
def set_url(
self, url: str
) -
def resize(
self, width: int, height: int
) -
def set_is_resizable(
self, resizable: bool
) -
def set_is_minimizable(
self, minimizable: bool
) -
def set_is_maximizable(
self, maximizable: bool
) -
def set_is_closable(
self, closable: bool
) -
def set_is_visible(
self, visible: bool
) -
def set_always_on_top(
self, always_on_top: bool
) -
def set_always_on_bottom(
self, always_on_bottom: bool
) -
def clear_all_browsing_data(
self
) -
def register_event(
self, event_name: str, callback: Callable[Awaitable[IpcResponse]]
) -> Awaitable[None] -
def register_subscriber(
self, event_name: str, callback: Callable[AsyncGenerator[IpcResponse, None]]
) -> Awaitable[None] -
def register_loop(
self, loop
)
-