39 lines
745 B
Python
39 lines
745 B
Python
"""
|
|
Type stubs for Decky plugin development.
|
|
"""
|
|
from typing import Any, Callable, Optional
|
|
|
|
|
|
class logger:
|
|
"""Plugin logger."""
|
|
@staticmethod
|
|
def info(msg: str) -> None: ...
|
|
@staticmethod
|
|
def warning(msg: str) -> None: ...
|
|
@staticmethod
|
|
def error(msg: str) -> None: ...
|
|
@staticmethod
|
|
def debug(msg: str) -> None: ...
|
|
|
|
|
|
class plugin:
|
|
"""Plugin decorator and utilities."""
|
|
@staticmethod
|
|
def call(method: str, *args: Any) -> Any: ...
|
|
|
|
|
|
# Plugin lifecycle methods
|
|
async def _main() -> None:
|
|
"""Called when plugin loads."""
|
|
pass
|
|
|
|
|
|
async def _unload() -> None:
|
|
"""Called when plugin unloads."""
|
|
pass
|
|
|
|
|
|
async def _migration() -> None:
|
|
"""Called on plugin version change."""
|
|
pass
|