Conversation
|
It looks like One thing to note, you should be able to use the |
|
I fixed the issue with gidgen which was causing Pty.spawnAsync, Pty.spawnWithFdsAsync, Terminal.spawnAsync, and Terminal.spawnWithFdsAsync to be disabled. This fixed 7 methods in Gio as well which is an added bonus. For reference there was code to reject callbacks which had multiple anonymous void* arguments, but this was also erroneously being applied to regular methods/functions, which meant any method/function with multiple callbacks each with their own data closure arguments would get disabled. The remaining methods Vte.Terminal.get_text, Vte.Terminal.get_text_include_trailing_spaces, and Vte.Terminal.get_text_range have a deprecated GArray parameter that uses an opaque structure type which is now supposed to always be passed as The Vte.Terminal.setup-context-menu signal has an EventContext parameter which is an opaque structure (just a pointer). This could probably be easily supported by just passing the pointer. These types of situations probably have troublesome memory management in some scenarios, but I think this case wouldn't have any issues if it was implemented that way. |
|
PERFECT! Will give it a try tomorrow. Once the spawnAsync works the way it should this PR can be considered ready to be merged. Thanks EG! |
|
I managed to get the Vte.Terminal.setup-context-menu signal working (gidgen commit), just by enabling opaque pointer types to be passed to signal callbacks, which will probably work (didn't actually test it). That leaves just the 3 methods with GArray parameters. Looking more closely I see that the methods themselves are marked as deprecated. Maybe they should just be marked as ignore? |
|
Looks like those methods are indeed replaced by other methods. If you agree that disabling those methods makes sense, you could add the following to the //# Disable some problematic deprecated methods
//!set class[Terminal].method[get_text][disable] 1
//!set class[Terminal].method[get_text_include_trailing_spaces][disable] 1
//!set class[Terminal].method[get_text_range][disable] 1That would result in 100% coverage in Vte. |
As the title says - this PR adds VTE (GTK4) support to giddy. Once we have Gtk3 added we can also add VTE-GTK3 as well.
This was a good learning exercise for me, and I still consider it a work in process. Have a look and let me know what needs to be modified. I will also write a tiny example application later today and put it somewhere online. Will attach screenshot here so we know it all works as expected.
I will NOT consider this PR ready to be merged until Terminal.spawnAsync() works. At the moment giddy does not generate this method.
Update: I've implemented a workaround that calls wrapped c_vte_terminal_spawn_async and it works:

Now the real questions is how do I instruct giddy to inject my own implementation of asyncSpawn() ??
The screenshot above is result of the following (just important part of the Application):
Full code here: https://codeberg.org/dejan/gid-examples