Change build scripts
[jvcard.git] / src / com / googlecode / lanterna / terminal / ExtendedTerminal.java
1 package com.googlecode.lanterna.terminal;
2
3 import java.io.IOException;
4
5 import com.googlecode.lanterna.graphics.Scrollable;
6
7 /**
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
11 *
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.
14 * @author Martin
15 */
16 public interface ExtendedTerminal extends Terminal, Scrollable {
17
18 /**
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
22 */
23 void setTerminalSize(int columns, int rows) throws IOException;
24
25 /**
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
30 */
31 void setTitle(String title) throws IOException;
32
33 /**
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
36 */
37 void pushTitle() throws IOException;
38
39 /**
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
43 */
44 void popTitle() throws IOException;
45
46 /**
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
49 */
50 void iconify() throws IOException;
51
52 /**
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
55 */
56 void deiconify() throws IOException;
57
58 /**
59 * Maximizes the terminal, so that it takes up all available space
60 * @throws IOException If the was an underlying I/O error
61 */
62 void maximize() throws IOException;
63
64 /**
65 * Restores the terminal back to its previous size, after having been maximized
66 * @throws IOException If the was an underlying I/O error
67 */
68 void unmaximize() throws IOException;
69
70 /**
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.
75 *
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
78 */
79 void setMouseCaptureMode(MouseCaptureMode mouseCaptureMode) throws IOException;
80 }