from . import ev_build as ev_build
from ._ev import ffi as ffi, lib as lib
from typing import Any, Callable, Optional

class Loop:
    def __init__(self) -> None: ...
    def destroy(self) -> None: ...
    def run(self, flags: int = ...) -> None: ...
    def break_(self, flags: int = ...) -> None: ...

class IOWatcher:
    def __init__(self, callback: Callable[..., Any], file_descriptor: int, flags: int) -> None: ...
    def start(self, loop: Loop) -> None: ...
    def stop(self, loop: Loop) -> None: ...

class SignalWatcher:
    def __init__(self, callback: Callable[..., Any], signum: int) -> None: ...
    def start(self, loop: Loop) -> None: ...
    def stop(self, loop: Loop) -> None: ...

class TimerWatcher:
    next_stop: int
    def __init__(self, callback: Callable[..., Any], after: float, repeat: float = ...) -> None: ...
    def start(self, loop: Loop, after: Optional[float] = ..., repeat: Optional[float] = ...) -> None: ...
    def stop(self, loop: Loop) -> None: ...
    def again(self, loop: Loop) -> None: ...
    def remaining(self, loop: Loop) -> float: ...
    def update_next_stop(self) -> None: ...
    def overdue(self, timeout: float) -> bool: ...
