Ver Fonte

Merge pull request #129 from tauu/limited-window-manipulation

feat: limited window manipulation support
xuty há 3 anos atrás
pai
commit
d20e2d74bb

+ 13 - 20
example/pubspec.lock

@@ -56,7 +56,7 @@ packages:
       name: async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.8.2"
+    version: "2.9.0"
   boolean_selector:
     dependency: transitive
     description:
@@ -70,21 +70,14 @@ packages:
       name: characters
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.2.0"
-  charcode:
-    dependency: transitive
-    description:
-      name: charcode
-      url: "https://pub.dartlang.org"
-    source: hosted
-    version: "1.3.1"
+    version: "1.2.1"
   clock:
     dependency: transitive
     description:
       name: clock
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   collection:
     dependency: transitive
     description:
@@ -161,7 +154,7 @@ packages:
       name: fake_async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.3.0"
+    version: "1.3.1"
   ffi:
     dependency: transitive
     description:
@@ -234,21 +227,21 @@ packages:
       name: matcher
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.12.11"
+    version: "0.12.12"
   material_color_utilities:
     dependency: transitive
     description:
       name: material_color_utilities
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.1.4"
+    version: "0.1.5"
   meta:
     dependency: transitive
     description:
       name: meta
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.7.0"
+    version: "1.8.0"
   package_config:
     dependency: transitive
     description:
@@ -262,7 +255,7 @@ packages:
       name: path
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.8.1"
+    version: "1.8.2"
   petitparser:
     dependency: transitive
     description:
@@ -316,7 +309,7 @@ packages:
       name: source_span
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.8.2"
+    version: "1.9.0"
   stack_trace:
     dependency: transitive
     description:
@@ -337,21 +330,21 @@ packages:
       name: string_scanner
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   term_glyph:
     dependency: transitive
     description:
       name: term_glyph
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.2.0"
+    version: "1.2.1"
   test_api:
     dependency: transitive
     description:
       name: test_api
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.4.9"
+    version: "0.4.12"
   typed_data:
     dependency: transitive
     description:
@@ -393,7 +386,7 @@ packages:
       path: ".."
       relative: true
     source: path
-    version: "3.2.4-alpha"
+    version: "3.2.5-alpha"
   yaml:
     dependency: transitive
     description:

+ 4 - 0
lib/src/core/escape/emitter.dart

@@ -26,4 +26,8 @@ class EscapeEmitter {
   String bracketedPaste(String text) {
     return '\x1b[200~$text\x1b[201~';
   }
+
+  String size(int rows, int cols) {
+    return '\x1b[8;$rows;${cols}t';
+  }
 }

+ 4 - 0
lib/src/core/escape/handler.dart

@@ -147,6 +147,10 @@ abstract class EscapeHandler {
 
   void setUnknownDecMode(int mode, bool enabled);
 
+  void resize(int cols, int rows);
+
+  void sendSize();
+
   /* Select Graphic Rendition (SGR) */
 
   void resetCursorStyle();

+ 50 - 1
lib/src/core/escape/parser.dart

@@ -655,7 +655,56 @@ class EscapeParser {
   ///
   /// https://terminalguide.namepad.de/seq/csi_st/
   void _csiWindowManipulation() {
-    // Not supported.
+    // The sequence needs at least one parameter.
+    if (_csi.params.isEmpty) {
+      return;
+    }
+    // Most the commands in this group are either of the scope of this package,
+    // or should be disabled for security risks.
+    switch (_csi.params.first) {
+      // Window handling is currently not in the scope of the package.
+      case 1: // Restore Terminal Window (show window if minimized)
+      case 2: // Minimize Terminal Window
+      case 3: // Set Terminal Window Position
+      case 4: // Set Terminal Window Size in Pixels
+      case 5: // Raise Terminal Window
+      case 6: // Lower Terminal Window
+      case 7: // Refresh/Redraw Terminal Window
+        return;
+      case 8: // Set Terminal Window Size (in characters)
+        // This CSI contains 2 more parameters: width and height.
+        if (_csi.params.length != 3) {
+          return;
+        }
+        final rows = _csi.params[1];
+        final cols = _csi.params[2];
+        handler.resize(cols, rows);
+        return;
+      // Window handling is currently no in the scope of the package.
+      case 9: // Maximize Terminal Window
+      case 10: // Alias: Maximize Terminal Window
+      case 11: // Report Terminal Window State
+      case 13: // Report Terminal Window Position
+      case 14: // Report Terminal Window Size in Pixels
+      case 15: // Report Screen Size in Pixels
+      case 16: // Report Cell Size in Pixels
+        return;
+      case 18: // Report Terminal Size (in characters)
+        handler.sendSize();
+        return;
+      // Screen handling is currently no in the scope of the package.
+      case 19: // Report Screen Size (in characters)
+      // Disabled as these can a security risk.
+      case 20: // Get Icon Title
+      case 21: // Get Terminal Title
+      // Not implemented.
+      case 22: // Push Terminal Title
+      case 23: // Pop Terminal Title
+        return;
+      // Unknown CSI.
+      default:
+        return;
+    }
   }
 
   /// `ESC [ Ps A` Cursor Up (CUU)

+ 6 - 0
lib/src/terminal.dart

@@ -237,6 +237,7 @@ class Terminal with Observable implements TerminalState, EscapeHandler {
   /// Resize the terminal screen. [newWidth] and [newHeight] should be greater
   /// than 0. Text reflow is currently not implemented and will be avaliable in
   /// the future.
+  @override
   void resize(
     int newWidth,
     int newHeight, [
@@ -528,6 +529,11 @@ class Terminal with Observable implements TerminalState, EscapeHandler {
     _buffer.insertBlankChars(amount);
   }
 
+  @override
+  void sendSize() {
+    onOutput?.call(_emitter.size(viewHeight, viewWidth));
+  }
+
   @override
   void unknownCSI(int finalByte) {
     // no-op

+ 10 - 0
lib/src/utils/debugger.dart

@@ -330,6 +330,16 @@ class _TerminalDebuggerHandler implements EscapeHandler {
     onCommand('insertBlankChars($amount)');
   }
 
+  @override
+  void resize(int cols, int rows) {
+    onCommand('resize($cols, $rows)');
+  }
+
+  @override
+  void sendSize() {
+    onCommand('sendSize');
+  }
+
   /* Modes */
 
   @override

+ 16 - 16
pubspec.lock

@@ -42,7 +42,7 @@ packages:
       name: async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.8.2"
+    version: "2.9.0"
   boolean_selector:
     dependency: transitive
     description:
@@ -112,7 +112,7 @@ packages:
       name: characters
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.2.0"
+    version: "1.2.1"
   charcode:
     dependency: transitive
     description:
@@ -133,14 +133,14 @@ packages:
       name: clock
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   code_builder:
     dependency: transitive
     description:
       name: code_builder
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "4.1.0"
+    version: "4.3.0"
   collection:
     dependency: transitive
     description:
@@ -203,7 +203,7 @@ packages:
       name: fake_async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.3.0"
+    version: "1.3.1"
   file:
     dependency: transitive
     description:
@@ -311,21 +311,21 @@ packages:
       name: matcher
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.12.11"
+    version: "0.12.12"
   material_color_utilities:
     dependency: transitive
     description:
       name: material_color_utilities
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.1.4"
+    version: "0.1.5"
   meta:
     dependency: "direct main"
     description:
       name: meta
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.7.0"
+    version: "1.8.0"
   mime:
     dependency: transitive
     description:
@@ -339,7 +339,7 @@ packages:
       name: mockito
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "5.3.0"
+    version: "5.3.1"
   node_preamble:
     dependency: transitive
     description:
@@ -360,7 +360,7 @@ packages:
       name: path
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.8.1"
+    version: "1.8.2"
   pedantic:
     dependency: transitive
     description:
@@ -470,7 +470,7 @@ packages:
       name: source_span
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.8.2"
+    version: "1.9.0"
   stack_trace:
     dependency: transitive
     description:
@@ -498,35 +498,35 @@ packages:
       name: string_scanner
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   term_glyph:
     dependency: transitive
     description:
       name: term_glyph
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.2.0"
+    version: "1.2.1"
   test:
     dependency: "direct dev"
     description:
       name: test
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.21.1"
+    version: "1.21.4"
   test_api:
     dependency: transitive
     description:
       name: test_api
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.4.9"
+    version: "0.4.12"
   test_core:
     dependency: transitive
     description:
       name: test_core
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.4.13"
+    version: "0.4.16"
   timing:
     dependency: transitive
     description:

+ 1 - 1
pubspec.yaml

@@ -22,7 +22,7 @@ dev_dependencies:
   test: ^1.6.5
   lints: ^2.0.0
   dart_code_metrics: ^4.16.0
-  mockito: ^5.0.15
+  mockito: ^5.3.1
   build_runner: ^2.1.1
 
 # For information on the generic Dart part of this file, see the

+ 17 - 0
test/src/core/escape/parser_test.dart

@@ -0,0 +1,17 @@
+import 'package:mockito/annotations.dart';
+import 'package:mockito/mockito.dart';
+import 'package:test/test.dart';
+import 'package:xterm/xterm.dart';
+
+@GenerateNiceMocks([MockSpec<EscapeHandler>()])
+import 'parser_test.mocks.dart';
+
+void main() {
+  group('EscapeParser', () {
+    test('can parse window manipulation', () {
+      final parser = EscapeParser(MockEscapeHandler());
+      parser.write('\x1b[8;24;80t');
+      verify(parser.handler.resize(80, 24));
+    });
+  });
+}

+ 870 - 0
test/src/core/escape/parser_test.mocks.dart

@@ -0,0 +1,870 @@
+// Mocks generated by Mockito 5.3.1 from annotations
+// in xterm/test/src/core/escape/parser_test.dart.
+// Do not manually edit this file.
+
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:xterm/src/core/escape/handler.dart' as _i2;
+import 'package:xterm/src/core/mouse.dart' as _i3;
+
+// ignore_for_file: type=lint
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+// ignore_for_file: camel_case_types
+// ignore_for_file: subtype_of_sealed_class
+
+/// A class which mocks [EscapeHandler].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockEscapeHandler extends _i1.Mock implements _i2.EscapeHandler {
+  @override
+  void writeChar(int? char) => super.noSuchMethod(
+        Invocation.method(
+          #writeChar,
+          [char],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void bell() => super.noSuchMethod(
+        Invocation.method(
+          #bell,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void backspaceReturn() => super.noSuchMethod(
+        Invocation.method(
+          #backspaceReturn,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void tab() => super.noSuchMethod(
+        Invocation.method(
+          #tab,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void lineFeed() => super.noSuchMethod(
+        Invocation.method(
+          #lineFeed,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void carriageReturn() => super.noSuchMethod(
+        Invocation.method(
+          #carriageReturn,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void shiftOut() => super.noSuchMethod(
+        Invocation.method(
+          #shiftOut,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void shiftIn() => super.noSuchMethod(
+        Invocation.method(
+          #shiftIn,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unknownSBC(int? char) => super.noSuchMethod(
+        Invocation.method(
+          #unknownSBC,
+          [char],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void saveCursor() => super.noSuchMethod(
+        Invocation.method(
+          #saveCursor,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void restoreCursor() => super.noSuchMethod(
+        Invocation.method(
+          #restoreCursor,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void index() => super.noSuchMethod(
+        Invocation.method(
+          #index,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void nextLine() => super.noSuchMethod(
+        Invocation.method(
+          #nextLine,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setTapStop() => super.noSuchMethod(
+        Invocation.method(
+          #setTapStop,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void reverseIndex() => super.noSuchMethod(
+        Invocation.method(
+          #reverseIndex,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void designateCharset(int? charset) => super.noSuchMethod(
+        Invocation.method(
+          #designateCharset,
+          [charset],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unkownEscape(int? char) => super.noSuchMethod(
+        Invocation.method(
+          #unkownEscape,
+          [char],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void repeatPreviousCharacter(int? n) => super.noSuchMethod(
+        Invocation.method(
+          #repeatPreviousCharacter,
+          [n],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursor(
+    int? x,
+    int? y,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setCursor,
+          [
+            x,
+            y,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorX(int? x) => super.noSuchMethod(
+        Invocation.method(
+          #setCursorX,
+          [x],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorY(int? y) => super.noSuchMethod(
+        Invocation.method(
+          #setCursorY,
+          [y],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendPrimaryDeviceAttributes() => super.noSuchMethod(
+        Invocation.method(
+          #sendPrimaryDeviceAttributes,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void clearTabStopUnderCursor() => super.noSuchMethod(
+        Invocation.method(
+          #clearTabStopUnderCursor,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void clearAllTabStops() => super.noSuchMethod(
+        Invocation.method(
+          #clearAllTabStops,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void moveCursorX(int? offset) => super.noSuchMethod(
+        Invocation.method(
+          #moveCursorX,
+          [offset],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void moveCursorY(int? n) => super.noSuchMethod(
+        Invocation.method(
+          #moveCursorY,
+          [n],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendSecondaryDeviceAttributes() => super.noSuchMethod(
+        Invocation.method(
+          #sendSecondaryDeviceAttributes,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendTertiaryDeviceAttributes() => super.noSuchMethod(
+        Invocation.method(
+          #sendTertiaryDeviceAttributes,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendOperatingStatus() => super.noSuchMethod(
+        Invocation.method(
+          #sendOperatingStatus,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendCursorPosition() => super.noSuchMethod(
+        Invocation.method(
+          #sendCursorPosition,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setMargins(
+    int? i, [
+    int? bottom,
+  ]) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setMargins,
+          [
+            i,
+            bottom,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void cursorNextLine(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #cursorNextLine,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void cursorPrecedingLine(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #cursorPrecedingLine,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseDisplayBelow() => super.noSuchMethod(
+        Invocation.method(
+          #eraseDisplayBelow,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseDisplayAbove() => super.noSuchMethod(
+        Invocation.method(
+          #eraseDisplayAbove,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseDisplay() => super.noSuchMethod(
+        Invocation.method(
+          #eraseDisplay,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseScrollbackOnly() => super.noSuchMethod(
+        Invocation.method(
+          #eraseScrollbackOnly,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseLineRight() => super.noSuchMethod(
+        Invocation.method(
+          #eraseLineRight,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseLineLeft() => super.noSuchMethod(
+        Invocation.method(
+          #eraseLineLeft,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseLine() => super.noSuchMethod(
+        Invocation.method(
+          #eraseLine,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void insertLines(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #insertLines,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void deleteLines(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #deleteLines,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void deleteChars(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #deleteChars,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void scrollUp(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #scrollUp,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void scrollDown(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #scrollDown,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void eraseChars(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #eraseChars,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void insertBlankChars(int? amount) => super.noSuchMethod(
+        Invocation.method(
+          #insertBlankChars,
+          [amount],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unknownCSI(int? finalByte) => super.noSuchMethod(
+        Invocation.method(
+          #unknownCSI,
+          [finalByte],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setInsertMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setInsertMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setLineFeedMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setLineFeedMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setUnknownMode(
+    int? mode,
+    bool? enabled,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setUnknownMode,
+          [
+            mode,
+            enabled,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorKeysMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setCursorKeysMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setReverseDisplayMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setReverseDisplayMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setOriginMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setOriginMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setColumnMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setColumnMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setAutoWrapMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setAutoWrapMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setMouseMode(_i3.MouseMode? mode) => super.noSuchMethod(
+        Invocation.method(
+          #setMouseMode,
+          [mode],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorBlinkMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setCursorBlinkMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorVisibleMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setCursorVisibleMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void useAltBuffer() => super.noSuchMethod(
+        Invocation.method(
+          #useAltBuffer,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void useMainBuffer() => super.noSuchMethod(
+        Invocation.method(
+          #useMainBuffer,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void clearAltBuffer() => super.noSuchMethod(
+        Invocation.method(
+          #clearAltBuffer,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setAppKeypadMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setAppKeypadMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setReportFocusMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setReportFocusMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setMouseReportMode(_i3.MouseReportMode? mode) => super.noSuchMethod(
+        Invocation.method(
+          #setMouseReportMode,
+          [mode],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setAltBufferMouseScrollMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setAltBufferMouseScrollMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setBracketedPasteMode(bool? enabled) => super.noSuchMethod(
+        Invocation.method(
+          #setBracketedPasteMode,
+          [enabled],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setUnknownDecMode(
+    int? mode,
+    bool? enabled,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setUnknownDecMode,
+          [
+            mode,
+            enabled,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void resize(
+    int? cols,
+    int? rows,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #resize,
+          [
+            cols,
+            rows,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void sendSize() => super.noSuchMethod(
+        Invocation.method(
+          #sendSize,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void resetCursorStyle() => super.noSuchMethod(
+        Invocation.method(
+          #resetCursorStyle,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorBold() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorBold,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorFaint() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorFaint,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorItalic() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorItalic,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorUnderline() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorUnderline,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorBlink() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorBlink,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorInverse() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorInverse,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorInvisible() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorInvisible,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setCursorStrikethrough() => super.noSuchMethod(
+        Invocation.method(
+          #setCursorStrikethrough,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorBold() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorBold,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorFaint() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorFaint,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorItalic() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorItalic,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorUnderline() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorUnderline,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorBlink() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorBlink,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorInverse() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorInverse,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorInvisible() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorInvisible,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsetCursorStrikethrough() => super.noSuchMethod(
+        Invocation.method(
+          #unsetCursorStrikethrough,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setForegroundColor16(int? color) => super.noSuchMethod(
+        Invocation.method(
+          #setForegroundColor16,
+          [color],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setForegroundColor256(int? index) => super.noSuchMethod(
+        Invocation.method(
+          #setForegroundColor256,
+          [index],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setForegroundColorRgb(
+    int? r,
+    int? g,
+    int? b,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setForegroundColorRgb,
+          [
+            r,
+            g,
+            b,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void resetForeground() => super.noSuchMethod(
+        Invocation.method(
+          #resetForeground,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setBackgroundColor16(int? color) => super.noSuchMethod(
+        Invocation.method(
+          #setBackgroundColor16,
+          [color],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setBackgroundColor256(int? index) => super.noSuchMethod(
+        Invocation.method(
+          #setBackgroundColor256,
+          [index],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setBackgroundColorRgb(
+    int? r,
+    int? g,
+    int? b,
+  ) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setBackgroundColorRgb,
+          [
+            r,
+            g,
+            b,
+          ],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void resetBackground() => super.noSuchMethod(
+        Invocation.method(
+          #resetBackground,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unsupportedStyle(int? param) => super.noSuchMethod(
+        Invocation.method(
+          #unsupportedStyle,
+          [param],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setTitle(String? name) => super.noSuchMethod(
+        Invocation.method(
+          #setTitle,
+          [name],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void setIconName(String? name) => super.noSuchMethod(
+        Invocation.method(
+          #setIconName,
+          [name],
+        ),
+        returnValueForMissingStub: null,
+      );
+  @override
+  void unknownOSC(String? ps) => super.noSuchMethod(
+        Invocation.method(
+          #unknownOSC,
+          [ps],
+        ),
+        returnValueForMissingStub: null,
+      );
+}