| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [DartPackage="mojo_services"] | |
| 6 module mojo.terminal; | |
| 7 | |
| 8 import "files/interfaces/file.mojom"; | |
| 9 import "files/interfaces/types.mojom"; | |
| 10 import "terminal/public/interfaces/terminal_client.mojom"; | |
| 11 | |
| 12 // Interface for actual terminal programs, in particular, for a single terminal | |
| 13 // display. For terminals that display output and are embeddable, this will | |
| 14 // typically be a service provided by the |ViewManagerClient| (see |OnEmbed()|). | |
| 15 interface Terminal { | |
| 16 // Connects to the terminal. If |force| is true, it will terminate any | |
| 17 // existing connection. The reply is sent when |terminal| is no longer | |
| 18 // connected. It is not successful only on "synchronous"/immediate failure, | |
| 19 // e.g., if something else is already connected (|force| is false). | |
| 20 Connect(mojo.files.File& terminal_file, bool force) | |
| 21 => (mojo.files.Error error); | |
| 22 | |
| 23 // Asks the terminal to connect to the given client. (|force| and response as | |
| 24 // are for |Connect()|.) | |
| 25 ConnectToClient(TerminalClient terminal_client, bool force) | |
| 26 => (mojo.files.Error error); | |
| 27 | |
| 28 // Gets the size of terminal (in number of rows/columns of text). (|rows| and | |
| 29 // |columns| are valid only on success.) | |
| 30 GetSize() => (mojo.files.Error error, uint32 rows, uint32 columns); | |
| 31 | |
| 32 // Sets the size of terminal (in number of rows/columns of text); 0 for | |
| 33 // rows or columns means to compute that automatically. If |reset| is true, it | |
| 34 // will reset (clear) the terminal. Note that it may not set exactly the | |
| 35 // requested size. (On success, the response will provide the actual set | |
| 36 // size.) | |
| 37 SetSize(uint32 rows, uint32 columns, bool reset) | |
| 38 => (mojo.files.Error error, uint32 rows, uint32 columns); | |
| 39 }; | |
| OLD | NEW |