PMD code sweep, #6 don't add MyWindow twice to MyApplication
[nikiroo-utils.git] / src / jexer / backend / Backend.java
index 2793ab00fa0eef73740b055cdd87f04dc8f92ace..20efa7eeaec8ad913387a4a546dcab512f41d512 100644 (file)
@@ -60,6 +60,13 @@ public interface Backend {
      */
     public void flushScreen();
 
+    /**
+     * Check if there are events in the queue.
+     *
+     * @return if true, getEvents() has something to return to the application
+     */
+    public boolean hasEvents();
+
     /**
      * Classes must provide an implementation to get keyboard, mouse, and
      * screen resize events.
@@ -81,4 +88,12 @@ public interface Backend {
      */
     public void setTitle(final String title);
 
+    /**
+     * Set listener to a different Object.
+     *
+     * @param listener the new listening object that run() wakes up on new
+     * input
+     */
+    public void setListener(final Object listener);
+
 }