godot-xterm/addons/godot_xterm/nodes/pseudoterminal/README.md
2020-10-05 18:04:41 +07:00

1.7 KiB

Pseudoterminal

Inherits: Node < Object

Can be used with the Terminal node to get an actual shell. Currently only tested/working on Linux.

Methods

Returns Signature
void write ( PoolByteArray data )
void resize ( Vector2 size )

Signals

  • data_sent ( PoolByteArray data )

    Emitted when some data comes out of the pseudoterminal. In a typical setup this signal would be connected to the Terminal's write() method.


  • exited ( int status )

    Emitted when the pseudoterminal's process (typically a shell like bash or sh) has exited. status is the exit code.

    For example, if you are using the terminal with a bash shell, then issuing the exit command would cause this signal to be emitted.

    > exit
    exit
    
    

Method Descriptions

  • void write ( PoolByteArray data )

    Writes data to the pseudoterminal. In a typical setup this would be connected to the Terminal's data_sent() signal.

  • void resize ( Vector2 size )

    Used to notify the pseudoterminal about window size changes. In a typical setup it would be connected to the Terminal's size_changed() signal.