mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-07-04 04:55:30 +02:00
feat(pty): add terminal_path property to pty
Property can be set to the NodePath of a Terminal node. Doing so will conveniently set up the neccessary signals between Terminal and PTY for them to function together.
This commit is contained in:
parent
fa49834347
commit
e816396d60
3 changed files with 73 additions and 8 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "terminal.h"
|
||||
|
||||
#include <godot_cpp/classes/mutex.hpp>
|
||||
#include <godot_cpp/classes/node.hpp>
|
||||
#include <godot_cpp/classes/os.hpp>
|
||||
|
@ -57,6 +59,9 @@ namespace godot
|
|||
void set_use_threads(bool p_use);
|
||||
bool is_using_threads() const;
|
||||
|
||||
void set_terminal_path(NodePath p_terminal_path);
|
||||
NodePath get_terminal_path() const;
|
||||
|
||||
String get_pts_name() const;
|
||||
|
||||
Error fork(const String &file = "", const PackedStringArray &args = PackedStringArray(), const String &cwd = ".", const int cols = 80, const int rows = 24);
|
||||
|
@ -83,6 +88,9 @@ namespace godot
|
|||
|
||||
String pts_name = "";
|
||||
|
||||
NodePath terminal_path;
|
||||
Terminal *terminal = nullptr;
|
||||
|
||||
String _get_fork_file(const String &file) const;
|
||||
Dictionary _get_fork_env() const;
|
||||
PackedStringArray _parse_env(const Dictionary &env) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue