21
21
* A terminal session, consisting of a process coupled to a terminal interface.
22
22
* <p>
23
23
* The subprocess will be executed by the constructor, and when the size is made known by a call to
24
- * {@link #updateSize(int, int)} terminal emulation will begin and threads will be spawned to handle the subprocess I/O.
24
+ * {@link #updateSize(int, int, int, int )} terminal emulation will begin and threads will be spawned to handle the subprocess I/O.
25
25
* All terminal emulation and callback methods will be performed on the main thread.
26
26
* <p>
27
27
* The child process may be exited forcefully by using the {@link #finishIfRunning()} method.
@@ -61,7 +61,7 @@ public final class TerminalSession extends TerminalOutput {
61
61
62
62
/**
63
63
* The file descriptor referencing the master half of a pseudo-terminal pair, resulting from calling
64
- * {@link JNI#createSubprocess(String, String, String[], String[], int[], int, int)}.
64
+ * {@link JNI#createSubprocess(String, String, String[], String[], int[], int, int, int, int )}.
65
65
*/
66
66
private int mTerminalFileDescriptor ;
67
67
@@ -100,11 +100,11 @@ public void updateTerminalSessionClient(TerminalSessionClient client) {
100
100
}
101
101
102
102
/** Inform the attached pty of the new size and reflow or initialize the emulator. */
103
- public void updateSize (int columns , int rows ) {
103
+ public void updateSize (int columns , int rows , int fontWidth , int fontHeight ) {
104
104
if (mEmulator == null ) {
105
- initializeEmulator (columns , rows );
105
+ initializeEmulator (columns , rows , fontWidth , fontHeight );
106
106
} else {
107
- JNI .setPtyWindowSize (mTerminalFileDescriptor , rows , columns );
107
+ JNI .setPtyWindowSize (mTerminalFileDescriptor , rows , columns , fontWidth , fontHeight );
108
108
mEmulator .resize (columns , rows );
109
109
}
110
110
}
@@ -120,11 +120,11 @@ public String getTitle() {
120
120
* @param columns The number of columns in the terminal window.
121
121
* @param rows The number of rows in the terminal window.
122
122
*/
123
- public void initializeEmulator (int columns , int rows ) {
123
+ public void initializeEmulator (int columns , int rows , int cellWidth , int cellHeight ) {
124
124
mEmulator = new TerminalEmulator (this , columns , rows , mTranscriptRows , mClient );
125
125
126
126
int [] processId = new int [1 ];
127
- mTerminalFileDescriptor = JNI .createSubprocess (mShellPath , mCwd , mArgs , mEnv , processId , rows , columns );
127
+ mTerminalFileDescriptor = JNI .createSubprocess (mShellPath , mCwd , mArgs , mEnv , processId , rows , columns , cellWidth , cellHeight );
128
128
mShellPid = processId [0 ];
129
129
130
130
final FileDescriptor terminalFileDescriptorWrapped = wrapFileDescriptor (mTerminalFileDescriptor , mClient );
0 commit comments