[ANN] TextUserInterfaces.jl v0.0.1

Hi!

Well, it was a long journey until here :slight_smile: I finally finished something worthy of registering. The package TextUserInterfaces.jl is being registered and should be available in a couple of days if everything goes right.

The idea is to have a package that wraps NCurses and provide a Julia-like API to create text user interfaces. From the previous examples that I showed, I changed a lot of things and went in a direction more like Qt. We will have windows, widgets, focus manger, etc. This, unfortunately, is still far away from being production-ready (Help is veeeery welcome!). Currently, we have as widgets labels, buttons and progress bars. Of course, custom widgets can be created.

What can be considered in a good shape is the low-level access to NCurses. In this case, if a function you need is not available, just let me know. For the majority of cases, adding a new function is very easy.

I provided a proof of concept (a Tic Tac Toe or, as we Brazilian call, Jogo da Velha) to show what kind of API I would like to have. If you want to play, dev the repository and execute the file tictactoe.jl inside the folder example. (NOTE: It will only work in Unix-like environments since I have no idea how to use NCurses in Windows…)

TUI-TicTacToe

18 Likes

Note that we now have ncurses in JuliaBinaryWrappers: https://github.com/JuliaBinaryWrappers/Ncurses_jll.jl Unfortunately we couldn’t build for Windows yet, but maybe it would be good to consider moving to these binaries once we can cover all platforms? (PS: honestly I have no clue whether ncurses is supposed to work on Windows at all)

1 Like

Thanks! This would be awesome since the user will not need to install anything beside the package. I will try to make it work together with my package.

W.r.t. Windows, I also have no idea…

I found this https://pdcurses.org/. It’s not ncurses but curses… Still you probably could switch between nccurses & pdcurses by abstracting it with a wrapper layer.
Or use the WLS but that’s really just linux :slight_smile:

Good! It should be quite easy to add the abstracting layer and use. Maybe someone can help me here.

I made a PR that makes Ncurses compile for Windows: https://github.com/JuliaPackaging/Yggdrasil/pull/126

1 Like

That’s awesome! Is the API the same?

I guess so :smiley:

1 Like