[ANN] Bogue, the OCaml GUI

Amazing! This was it!

@sanette Thanks for your troubleshooting steps. I was working through them before @jbeckford replied. I did manage to get a window running in C with SDL, too.

4 Likes

Dear all,

I’m happy to announce a brand new version of Bogue, version 20240928, now availble on opam.

Changes are mostly under the hood. We have nice improvements by @edwin : automatic monitor vsync is now enabled by default, for smoother animations, and most importantly we finally align with the latest version of tsdl. It will simplify maintenance, but it also implies that too old versions of SDL will not work anymore. On the other hand we were kind of obliged to move forward, because tsdl.0.9.8 won’t install on ocaml 5.2.

  • if you’re on Ubuntu 20.04, installing Bogue with opam install bogue will by default pull tsdl.1.1.0 in, which requires SDL >= 2.0.18, not shipped by the OS. A workaround is to explicitly require opam install tsdl.1.0.0 (or manually installing a newer SDL)
  • if your OS ships SDL < 2.0.10 you have no other choice than manually installing a newer SDL (which is not that complicated)

Happy bogue-ing!

7 Likes

Dear all,

I’m happy to announce a new version of Bogue, version 20250224, now available on opam.

The main novelty is a brand new File dialog. It will open a new window (or popup) which will let the user navigate the file system and select one or more files or directories.

This corresponds to the new File module.

You might also be interested in the Monitor submodule, which implements a file monitoring API based on fswatch (if available) or Unix.stat.

If you are curious, here is a graphical summary of the current functionalities of Bogue’s file dialog (I hope that more will be added soon; I’m open to suggestions)

PS: @Sachindra_Ragul, yes we did it finally :wink: better late than never

13 Likes

Hello

it’s my pleasure to announce a new version of Bogue, version 20250815 available on opam.

The main novelty is an internationalization mechanism. All text used by Bogue (like ‘close’ in a close button) will be automatically translated into the user’s language. Currently 15 languages are supported but more can easily be added either via configuration files, on directly at run-time using the i18n API.

note: Internationalization has been tested only for a small number of applications; don’t hesitate to report bugs.

Happy bogue-ing!

10 Likes

Hi

I’m happy to announce Bogue version 20260208, now available on opam.

The main novelties are

  • Color management has been improved (warning: breaking change)
  • New: Text input validator : you can write rules (or simply a regexp) to warn the user whether the text they are typing is correct.
  • New: Mailbox module: setup a mailbox server and send arbitrary messages between widgets.
  • Installation on Windows has been simplified.
  • Compatibility with old versions of SDL.

Have fun!

Here are the details:

  • Colors: All colors and some of the API have been split into the RGB and RGBA modules. Named colors are now true identifiers:

    • instead of writing let c = Draw.find_color "aliceblue you should now use let c = RGB.aliceblue; and instead of let c = Draw.(opaque (find_color "aliceblue")) you write now let c = RGBA.aliceblue.
    • if you’re lazy to correct these, you may simply do open Bogue.RGB open Bogue.RGBA; it should be enough in most cases.
  • Text input validator: Example using the included email validator:

emailv

  • Mailbox API: for complicated GUIs with circular connnections between widgets, the usual Bogue solution was to use an update event, see here. Now this method has been leveraged to a full Mailbox system where any type of message can be sent.

  • Windows users should follow the instructions here. Continuous testing (CI) is now guaranteed to work on Windows mingw64 (and of course Linux and MacOS)

  • SDL: if you have an old version of SDL (>= 2.0.6) and are too lazy to upgrade, rejoice: simply follow the instructions here

8 Likes