Add @Subscribe annotation

[no changelog]
This commit is contained in:
Linnea Gräf
2024-05-07 20:26:04 +02:00
parent 0cb976ce07
commit 8f3cc34740
11 changed files with 252 additions and 47 deletions

View File

@@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package moe.nea.firmament.events.subscription
import moe.nea.firmament.events.FirmamentEvent
import moe.nea.firmament.events.FirmamentEventBus
interface SubscriptionOwner
data class Subscription<T : FirmamentEvent>(
val owner: SubscriptionOwner,
val invoke: (T) -> Unit,
val eventBus: FirmamentEventBus<T>,
)