@Override public int getHeight() { return size.getRows(); }
@Override public int getHeight() { return size.getRows(); }
@Override public int getHeight() { return size.getRows(); }
@Override public int getHeight() { return size.getRows(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public winsize(Size ws) { ws_row = (short) ws.getRows(); ws_col = (short) ws.getColumns(); }
public void resize() { Size size = terminal.getSize(); this.rows = size.getRows(); this.columns = size.getColumns(); this.force = true; }
public void nextPage() { int height = size.getRows() - computeHeader().size() - computeFooter().size(); scrollDown(height - 2); }
public void prevPage() { int height = size.getRows() - computeHeader().size() - computeFooter().size(); scrollUp(height - 2); }
@Override public void setSize(Size size) throws IOException { CLibrary.WinSize sz = new CLibrary.WinSize((short) size.getRows(), (short) size.getColumns()); CLibrary.ioctl(slave, CLibrary.TIOCSWINSZ, sz); }
public void copy(Size size) { setColumns(size.getColumns()); setRows(size.getRows()); }
void resetDisplay() { display.clear(); display.resize(size.getRows(), size.getColumns()); for (Buffer buffer : buffers) { buffer.resetDisplay(); } }
void resetDisplay() { display.clear(); display.resize(size.getRows(), size.getColumns()); for (Buffer buffer : buffers) { buffer.resetDisplay(); } }
private void drawBorderChar(long[] screen, Size size, int x, int y, long attr, int c) { if (x >= 0 && x < size.getColumns() && y >= 0 && y < size.getRows() - 1) { int oldc = (int)(screen[y * size.getColumns() + x] & 0xFFFFFFFFL); c = addBorder(c, oldc); screen[y * size.getColumns() + x] = attr | c; } }
private void drawBorderChar(long[] screen, Size size, int x, int y, long attr, int c) { if (x >= 0 && x < size.getColumns() && y >= 0 && y < size.getRows() - 1) { int oldc = (int)(screen[y * size.getColumns() + x] & 0xFFFFFFFFL); c = addBorder(c, oldc); screen[y * size.getColumns() + x] = attr | c; } }
public static LinuxNativePty open(Attributes attr, Size size) throws IOException { int[] master = new int[1]; int[] slave = new int[1]; byte[] buf = new byte[64]; CLibrary.openpty(master, slave, buf, attr != null ? termios(attr) : null, size != null ? new CLibrary.WinSize((short) size.getRows(), (short) size.getColumns()) : null); int len = 0; while (buf[len] != 0) { len++; } String name = new String(buf, 0, len); return new LinuxNativePty(master[0], newDescriptor(master[0]), slave[0], newDescriptor(slave[0]), name); }