package nxm.sys.lib;

/**
  Implements a user terminal in native code.

  This interface defines all of the methods that a user I/O terminal
  must implement to interact with the shell.

  @author Jeff Schoen
*/
public class NTerminal extends Terminal {

  /** NTerminal Contructor
      @param midas Midas context
   */
  public NTerminal (Midas midas) {
    super(midas, -1, -1);

    if (Shell.loadLibrary("sys","lib","NTerminal")) {
      getInterrupt();
    } else {
      throw new IllegalArgumentException("Native Terminal not loaded");
    }
  }

  public    native String getInput(String prompt, String seed, int flags);
  public synchronized native void print (String text);
  public    native int getInterrupt();
  public    native void setInterrupt(int value);
  protected native int getRowCount();
  protected native int getColCount();
}
