* available since Chrome 34
(ack-output tab-id id)
Called from |onProcessOutput| when the event is dispatched to terminal extension. Observing the terminal process output will be paused after |onProcessOutput| is dispatched until this method is called.
|tab-id| - Tab ID from |onProcessOutput| event. |id| - The id of the process to which |onProcessOutput| was dispatched.
Called from |onProcessOutput| when the event is dispatched to terminal extension. Observing the terminal process output will be paused after |onProcessOutput| is dispatched until this method is called. |tab-id| - Tab ID from |onProcessOutput| event. |id| - The id of the process to which |onProcessOutput| was dispatched.
(close-terminal-process id)
Closes previously opened process.
|id| - Unique id of the process we want to close.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Closes previously opened process. |id| - Unique id of the process we want to close. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(get-crosh-settings)
Returns an object (DictionaryValue) containing UI settings such as font style and color used by the crosh extension. This function is called by the terminal system app the first time it is run to migrate any previous settings.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [settings] where:
|settings| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Returns an object (DictionaryValue) containing UI settings such as font style and color used by the crosh extension. This function is called by the terminal system app the first time it is run to migrate any previous settings. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [settings] where: |settings| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(get-settings)
Returns an object (DictionaryValue) containing UI settings such as font style and colors used by terminal and stored as a syncable pref. The UI currently has ~70 properties and we wish to allow flexibility for these to change in the UI without updating this API, so we allow any properties.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [settings] where:
|settings| - Settings from prefs.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Returns an object (DictionaryValue) containing UI settings such as font style and colors used by terminal and stored as a syncable pref. The UI currently has ~70 properties and we wish to allow flexibility for these to change in the UI without updating this API, so we allow any properties. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [settings] where: |settings| - Settings from prefs. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(on-terminal-resize id width height)
Notify the process with the id id that terminal window size has changed.
|id| - The id of the process. |width| - New window width (as column count). |height| - New window height (as row count).
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Notify the process with the id id that terminal window size has changed. |id| - The id of the process. |width| - New window width (as column count). |height| - New window height (as row count). This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(open-terminal-process process-name)
(open-terminal-process process-name args)
Starts new process.
|process-name| - Name of the process to open. May be 'crosh' or 'vmshell'. |args| - Command line arguments to pass to the process.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [id] where:
|id| - Id of the launched process.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Starts new process. |process-name| - Name of the process to open. May be 'crosh' or 'vmshell'. |args| - Command line arguments to pass to the process. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [id] where: |id| - Id of the launched process. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(send-input id input)
Sends input that will be routed to stdin of the process with the specified id.
|id| - The id of the process to which we want to send input. |input| - Input we are sending to the process.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Sends input that will be routed to stdin of the process with the specified id. |id| - The id of the process to which we want to send input. |input| - Input we are sending to the process. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(set-settings settings)
Sets terminal UI settings which are stored as a syncable pref.
|settings| - Settings to update into prefs.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Sets terminal UI settings which are stored as a syncable pref. |settings| - Settings to update into prefs. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.terminal-private namespace.
Taps all valid non-deprecated events in chromex.app.terminal-private namespace.
(tap-on-process-output-events channel & args)
Fired when an opened process writes something to its output. Observing further process output will be blocked until |ackOutput| for the terminal is called. Internally, first event argument will be ID of the tab that contains terminal instance for which this event is intended. This argument will be stripped before passing the event to the extension.
Events will be put on the |channel| with signature [::on-process-output [id type text]] where:
|id| - Id of the process from which the output came. |type| - Type of the output stream from which output came. When process exits, output type will be set to exit |text| - Text that was written to the output stream.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Fired when an opened process writes something to its output. Observing further process output will be blocked until |ackOutput| for the terminal is called. Internally, first event argument will be ID of the tab that contains terminal instance for which this event is intended. This argument will be stripped before passing the event to the extension. Events will be put on the |channel| with signature [::on-process-output [id type text]] where: |id| - Id of the process from which the output came. |type| - Type of the output stream from which output came. When process exits, output type will be set to exit |text| - Text that was written to the output stream. Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
(tap-on-settings-changed-events channel & args)
Fired when terminal UI settings change.
Events will be put on the |channel| with signature [::on-settings-changed [settings]] where:
|settings| - Terminal UI Settings with updated values.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Fired when terminal UI settings change. Events will be put on the |channel| with signature [::on-settings-changed [settings]] where: |settings| - Terminal UI Settings with updated values. Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close