Commit graph

13 commits

Author SHA1 Message Date
Leroy Hopson
52a89827c9
Allow script loading when compiled with PTY_DISABLED 2024-01-06 23:16:52 +13:00
Leroy Hopson
ad7f97e493
Further progress towards Godot 4.0 support
- Primary example scenes (menu, terminal, and asciicast) working but
  still a lot of warning/error messages and some regressions.
- Editor integrated terminal works, but still a lot of warning/error
  messages and some regressions.
- Added support for "blink" display attribute.
- Removed GDScript terminal code. Terminal node is now purely a
  GDExtension. So is LibuvUtils.
- GUT tests not working yet.
- Still a lot of things to fix.
- So far, only built for and manually tested on Linux x86_64.
2023-01-08 22:45:18 +13:00
Leroy Hopson
44f7e3801c
Convert from GDNative to GDExtension
Work in progress.
2022-12-29 22:54:38 +13:00
Daniel Inkpen
5c39a8071f Probably some progress 2022-11-09 22:29:11 +00:00
Daniel Inkpen
099100d3e0 Reverse most obvious mistakes from Godot 4 automatic changes 2022-11-09 21:52:54 +00:00
Daniel Inkpen
cdbf3f2adc Godot 4 automatic changes 2022-11-09 20:57:46 +00:00
Leroy Hopson
8d656d8c71
Remove deprecated get_master() method of PTY 2022-08-26 12:35:54 +12:00
Leroy Hopson
41525959e1
Deprecate undocumented get_master() method
This method was never officially documented and used only as a workaround for
issue #53. It also returns an instance of the undocumented and scruffily
implemented Pipe class that I would prefer to keep internal.

Now that #53 has been fixed, this method can be removed from the unofficial
public API, but deprecate it just in case. If someone was using it then it
is still possible (although not supported) to access the `_pipe` property of
`_pty_native`.
2022-08-22 10:05:41 +12:00
Leroy Hopson
6cd5facb98
Deprecate the cols and rows properties of Terminal
As cols and rows are read only (i.e. automatically determined by rect
and font size) there is no need for the properties to be exposed.
Instead, users can get the calculated cols and rows using the get_cols()
and get_rows() methods.
2022-08-22 10:05:36 +12:00
Leroy Hopson
054c7c9ad4
Ensure initial PTY size matches Terminal (if any)
If a PTY has a terminal_path set to a valid Terminal, then ensure that
the initial cols and rows of PTY match the cols and rows of the Terminal
when calling fork() or open(), otherwise PTY will output wrong-sized
data for the Terminal until resized.

Fixes #56.
2022-08-15 17:09:25 +12:00
Leroy Hopson
df32ee3c18
Refactor PTY
PTY now provides a public interface to an underlying instance of
PTYNative. The PTYNative class can be extended as appropriate for
each platform and the platform-specific implementation will be
selected by PTY at runtime.
2022-07-11 09:33:01 +12:00
Leroy Hopson
0ae1d80abb
Prevent exit callback instance leaks
De-references pty_baton's exit callback after it is called so it can be
automatically released, preventing leaked instances.

Adds basic implementation for Pipe's get_status() method and forces PTY
to wait for child process to exit to ensure exit callback is cleaned up.

Adds a test to check that exit callback is still called as usual.
2022-07-11 09:33:01 +12:00
Leroy Hopson
9d15420df3
Move terminal.gd and pty.gd to godot_xterm directory
Makes for pretty paths when extending scripts:
`extends "res://addons/godot_xterm/terminal.gd"`
vs.
`extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"`

Currently "res://addons/godot_xterm/pty.gd" is acutally `pty_unix.gd`.
This is okay for now as the PTY node is only supported on Unix
platforms. However, we will need to sort it out when adding Windows
support as part of #25.

Also remove the GDXterm namespace.
2021-07-26 00:39:48 +07:00
Renamed from addons/godot_xterm/nodes/pty/unix/pty_unix.gd (Browse further)