2013-09-13 09:40:34 +02:00
|
|
|
# To create a new GUI, please add its code to this directory.
|
2016-01-29 22:25:59 +09:00
|
|
|
# Three objects are passed to the ElectrumGui: config, daemon and plugins
|
2018-09-25 18:15:28 +02:00
|
|
|
# The Wallet object is instantiated by the GUI
|
2013-09-11 11:45:58 +02:00
|
|
|
|
2013-09-13 09:40:34 +02:00
|
|
|
# Notifications about network events are sent to the GUI by using network.register_callback()
|
2021-03-09 17:52:36 +01:00
|
|
|
|
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
from . import qt
|
|
|
|
|
from . import kivy
|
2021-11-05 20:21:50 +01:00
|
|
|
from electrum.simple_config import SimpleConfig
|
|
|
|
|
from electrum.daemon import Daemon
|
|
|
|
|
from electrum.plugin import Plugins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BaseElectrumGui:
|
|
|
|
|
def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'):
|
|
|
|
|
self.config = config
|
|
|
|
|
self.daemon = daemon
|
|
|
|
|
self.plugins = plugins
|
|
|
|
|
|
|
|
|
|
def main(self) -> None:
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def stop(self) -> None:
|
|
|
|
|
"""Stops the GUI.
|
|
|
|
|
This method must be thread-safe.
|
|
|
|
|
"""
|
|
|
|
|
pass
|