mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 07:41:58 +00:00
add docstring for emit
This commit is contained in:
@@ -215,9 +215,11 @@ logger.setLevel(logging.INFO)
|
|||||||
"""
|
"""
|
||||||
Event handling
|
Event handling
|
||||||
"""
|
"""
|
||||||
# TODO better docstring im lazy
|
# This is overriden with an actual implementation before being passed to any plugins
|
||||||
|
# in ../sandboxed_plugin.py 's initialize function
|
||||||
async def emit(event: str, *args: Any) -> None:
|
async def emit(event: str, *args: Any) -> None:
|
||||||
"""
|
"""
|
||||||
Send an event to the frontend.
|
Triggers all event listeners in the frontend waiting for `event`, passing the remaining `*args` as the arguments to each listener function.
|
||||||
|
(Event listeners are set up in the frontend via the `addEventListener` function from `@decky/api`)
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
@@ -177,8 +177,9 @@ logger: logging.Logger
|
|||||||
"""
|
"""
|
||||||
Event handling
|
Event handling
|
||||||
"""
|
"""
|
||||||
# TODO better docstring im lazy
|
|
||||||
async def emit(event: str, *args: Any) -> None:
|
async def emit(event: str, *args: Any) -> None:
|
||||||
"""
|
"""
|
||||||
Send an event to the frontend.
|
Triggers all event listeners in the frontend waiting for `event`, passing the remaining `*args` as the arguments to each listener function.
|
||||||
|
(Event listeners are set up in the frontend via the `addEventListener` function from `@decky/api`)
|
||||||
"""
|
"""
|
||||||
@@ -6,7 +6,6 @@ interface PublicDeckyToasterState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class DeckyToasterState {
|
export class DeckyToasterState {
|
||||||
// TODO a set would be better
|
|
||||||
private _toasts: Set<ToastData> = new Set();
|
private _toasts: Set<ToastData> = new Set();
|
||||||
|
|
||||||
public eventBus = new EventTarget();
|
public eventBus = new EventTarget();
|
||||||
|
|||||||
Reference in New Issue
Block a user