Moved QueueMessage and subclasses from hooke.ui to the more central hooke.engine.
[hooke.git] / hooke / ui / __init__.py
index 6a76b82e5356c8b3a764b8d4542d1833766f4d27..1b939144b6f2c1c1f693bca8088891507661e982 100644 (file)
@@ -23,6 +23,7 @@ import ConfigParser as configparser
 
 from .. import version
 from ..config import Setting
+from ..engine import CloseEngine, CommandMessage
 from ..util.pluggable import IsSubclass, construct_odict
 
 try:
@@ -47,25 +48,6 @@ USER_INTERFACE_SETTING_SECTION = 'user interfaces'
 """
 
 
-class QueueMessage (object):
-    def __str__(self):
-        return self.__class__.__name__
-
-class CloseEngine (QueueMessage):
-    pass
-
-class CommandMessage (QueueMessage):
-    """A message storing a command to run, `command` should be a
-    :class:`hooke.command.Command` instance, and `arguments` should be
-    a :class:`dict` with `argname` keys and `value` values to be
-    passed to the command.
-    """
-    def __init__(self, command, arguments=None):
-        self.command = command
-        if arguments == None:
-            arguments = {}
-        self.arguments = arguments
-
 class UserInterface (object):
     """A user interface to drive the :class:`hooke.engine.CommandEngine`.
     """