[m-users.] Simple cross-platform GUI

Volker Wysk post at volker-wysk.de
Tue Sep 20 02:19:01 AEST 2022


Hi

Am Montag, dem 19.09.2022 um 16:12 +0200 schrieb Dirk Ziegemeyer:
> My plan is to add a very simple GUI to a Mercury command line application.
> 
> The Mercury app shall start an html server that serves a static HTML form where the user can enter all the arguments and options that would normally be processed by the getopt module from the standard library. When submitting this form, the Mercury application shall be called with the appropriate options. No further interaction is required.
> 
> The app shall be compiled with the C backend and be portable between Mac/Linux/Windows.
> 
> The code in extras/net/sockets.m and extras/posix/posix.socket.m is probably not working on Windows.
> 
> My search yielded some older posts on the users mailinglist pointing to so some http server and network bindings for Mercury:
> - https://github.com/sebgod/mercury-mongoose
> - https://github.com/yeslogic/httpsrv
> - https://github.com/FlyingJester/libfjnet.m
> 
> As all of the above bindings seem to be inactive, I'm wondering if there is any other solution. Is there any simple cross-platform socket or http-server binding for Mercury?
> 
> Are there any best practices for setting up a very simple GUI for Mercury?
> 
> Thank you very much in advance.

Might it be an option to write the GUI part in C? You could use an existing
cross-platform GUI library, such as GTK or Qt. GTK has a Rapid Application
Development tool, Glade. See https://glade.gnome.org/ . It might be easiest
to create your small GUI in Glade and let it call your Mercury program, like
you intend.

I don't have any experience with Glade, though.

Good luck,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220919/bce9a986/attachment.sig>


More information about the users mailing list