2024-02-24 07:47:12 +01:00
|
|
|
// SPDX-FileCopyrightText: 2021-2022, 2024 Leroy Hopson <godot-xterm@leroy.nix.nz>
|
2022-12-29 10:52:13 +01:00
|
|
|
// SPDX-License-Identifier: MIT
|
2021-07-02 19:27:34 +02:00
|
|
|
|
2024-02-24 07:47:12 +01:00
|
|
|
#pragma once
|
2021-07-02 19:27:34 +02:00
|
|
|
|
2022-12-29 10:52:13 +01:00
|
|
|
#include <godot_cpp/classes/ref_counted.hpp>
|
|
|
|
#include <godot_cpp/variant/callable.hpp>
|
2021-07-02 19:27:34 +02:00
|
|
|
|
|
|
|
namespace godot {
|
|
|
|
|
2022-12-29 10:52:13 +01:00
|
|
|
class PTYUnix : public RefCounted {
|
|
|
|
GDCLASS(PTYUnix, RefCounted)
|
2021-07-02 19:27:34 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
Array fork(String file,
|
|
|
|
int _ignored, /* FIXME: For some reason Pipe throws
|
|
|
|
ENOTSOCK in read callback if args (or another non-empty,
|
|
|
|
non-zero) value is in this position. */
|
2022-12-29 10:52:13 +01:00
|
|
|
PackedStringArray args, PackedStringArray env, String cwd, int cols,
|
|
|
|
int rows, int uid, int gid, bool utf8, Callable on_exit);
|
2021-07-02 19:27:34 +02:00
|
|
|
Array open(int cols, int rows);
|
2022-12-29 10:52:13 +01:00
|
|
|
Error resize(int fd, int cols, int rows);
|
2021-07-02 19:27:34 +02:00
|
|
|
String process(int fd, String tty);
|
|
|
|
|
|
|
|
void _init();
|
2022-12-29 10:52:13 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2021-07-02 19:27:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace godot
|