mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
attempt to add plugin events to the plugin frontend api.
unable to test right now though
This commit is contained in:
committed by
PartyWumpus
parent
de9d2144a6
commit
f9ff518e6d
@@ -19,7 +19,7 @@ import subprocess
|
||||
import logging
|
||||
import time
|
||||
|
||||
from typing import TypeVar, Type
|
||||
from typing import Any
|
||||
|
||||
"""
|
||||
Constants
|
||||
@@ -213,9 +213,8 @@ logger.setLevel(logging.INFO)
|
||||
"""
|
||||
Event handling
|
||||
"""
|
||||
DataType = TypeVar("DataType")
|
||||
# TODO better docstring im lazy
|
||||
async def emit(event: str, data: DataType | None = None, data_type: Type[DataType] | None = None) -> None:
|
||||
async def emit(event: str, *args: Any) -> None:
|
||||
"""
|
||||
Send an event to the frontend.
|
||||
"""
|
||||
|
||||
@@ -16,7 +16,7 @@ __version__ = '0.1.0'
|
||||
|
||||
import logging
|
||||
|
||||
from typing import TypeVar, Type
|
||||
from typing import Any
|
||||
|
||||
"""
|
||||
Constants
|
||||
@@ -177,9 +177,8 @@ logger: logging.Logger
|
||||
"""
|
||||
Event handling
|
||||
"""
|
||||
DataType = TypeVar("DataType")
|
||||
# TODO better docstring im lazy
|
||||
async def emit(event: str, data: DataType | None = None, data_type: Type[DataType] | None = None) -> None:
|
||||
async def emit(event: str, *args: Any) -> None:
|
||||
"""
|
||||
Send an event to the frontend.
|
||||
"""
|
||||
Reference in New Issue
Block a user