*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
public abstract class GenericBackend implements Backend {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* The session information.
*/
protected SessionInfo sessionInfo;
+ /**
+ * The screen to draw on.
+ */
+ protected Screen screen;
+
+ /**
+ * Input events are processed by this Terminal.
+ */
+ protected TerminalReader terminal;
+
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Backend ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Getter for sessionInfo.
*
return sessionInfo;
}
- /**
- * The screen to draw on.
- */
- protected Screen screen;
-
/**
* Getter for screen.
*
}
/**
- * Input events are processed by this Terminal.
+ * Check if there are events in the queue.
+ *
+ * @return if true, getEvents() has something to return to the application
*/
- protected TerminalReader terminal;
+ public boolean hasEvents() {
+ return terminal.hasEvents();
+ }
/**
* Get keyboard, mouse, and screen resize events.
terminal.setListener(listener);
}
+ /**
+ * Reload backend options from System properties.
+ */
+ public void reloadOptions() {
+ terminal.reloadOptions();
+ }
+
}