1 package com
.googlecode
.lanterna
.terminal
;
3 import java
.io
.IOException
;
5 import com
.googlecode
.lanterna
.graphics
.Scrollable
;
8 * This class extends the normal Terminal interface and adds a few more methods that are considered rare and shouldn't
9 * be encouraged to be used. Some of these may move into Terminal if it turns out that they are indeed well-supported.
10 * Most of these extensions are picked up from here: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
12 * This class is <b>not</b> considered stable and may change within releases. Do not depend on methods in this interface
13 * unless you are ok with occasionally having to fix broken code after minor library upgrades.
16 public interface ExtendedTerminal
extends Terminal
, Scrollable
{
19 * Attempts to resize the terminal through dtterm extensions "CSI 8 ; rows ; columns ; t". This isn't widely
20 * supported, which is why the method is not exposed through the common Terminal interface.
21 * @throws java.io.IOException If the was an underlying I/O error
23 void setTerminalSize(int columns
, int rows
) throws IOException
;
26 * This methods sets the title of the terminal, which is normally only visible if you are running the application
27 * in a terminal emulator in a graphical environment.
28 * @param title Title to set on the terminal
29 * @throws java.io.IOException If the was an underlying I/O error
31 void setTitle(String title
) throws IOException
;
34 * Saves the current window title on a stack managed internally by the terminal.
35 * @throws java.io.IOException If the was an underlying I/O error
37 void pushTitle() throws IOException
;
40 * Replaces the terminal title with the top element from the title stack managed by the terminal (the element is
41 * removed from the stack as expected)
42 * @throws java.io.IOException If the was an underlying I/O error
44 void popTitle() throws IOException
;
47 * Iconifies the terminal, this likely means minimizing the window with most window managers
48 * @throws IOException If the was an underlying I/O error
50 void iconify() throws IOException
;
53 * De-iconifies the terminal, which likely means restoring it from minimized state with most window managers
54 * @throws IOException If the was an underlying I/O error
56 void deiconify() throws IOException
;
59 * Maximizes the terminal, so that it takes up all available space
60 * @throws IOException If the was an underlying I/O error
62 void maximize() throws IOException
;
65 * Restores the terminal back to its previous size, after having been maximized
66 * @throws IOException If the was an underlying I/O error
68 void unmaximize() throws IOException
;
71 * Enabled or disables capturing of mouse event. This is not recommended to use as most users are not familiar with
72 * the fact that terminal emulators allow capturing mouse input. You can decide which events you want to capture but
73 * be careful since different terminal emulators will support these modes differently. Mouse capture mode will be
74 * automatically disabled when the application exits through a shutdown hook.
76 * @param mouseCaptureMode Which mouse events to capture, pass in {@code null} to disable mouse input capturing
77 * @throws IOException If the was an underlying I/O error
79 void setMouseCaptureMode(MouseCaptureMode mouseCaptureMode
) throws IOException
;