Convert from GDNative to GDExtension

Work in progress.
This commit is contained in:
Leroy Hopson 2022-12-29 22:52:13 +13:00
parent 6b47d35835
commit 44f7e3801c
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
25 changed files with 408 additions and 304 deletions

View file

@ -1,29 +1,32 @@
// Copyright (c) 2021, Leroy Hopson (MIT License).
// SPDX-FileCopyrightText: 2021-2022 Leroy Hopson <godot-xterm@leroy.geek.nz>
// SPDX-License-Identifier: MIT
#ifndef GODOT_XTERM_PTY_H
#define GODOT_XTERM_PTY_H
#include <FuncRef.hpp>
#include <Godot.hpp>
#include <godot_cpp/classes/ref_counted.hpp>
#include <godot_cpp/variant/callable.hpp>
namespace godot {
class PTYUnix : public Reference {
GODOT_CLASS(PTYUnix, Reference)
class PTYUnix : public RefCounted {
GDCLASS(PTYUnix, RefCounted)
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. */
PoolStringArray args, PoolStringArray env, String cwd, int cols,
int rows, int uid, int gid, bool utf8, Ref<FuncRef> on_exit);
PackedStringArray args, PackedStringArray env, String cwd, int cols,
int rows, int uid, int gid, bool utf8, Callable on_exit);
Array open(int cols, int rows);
godot_error resize(int fd, int cols, int rows);
Error resize(int fd, int cols, int rows);
String process(int fd, String tty);
void _init();
static void _register_methods();
protected:
static void _bind_methods();
};
} // namespace godot