[ANN] Bogue, the OCaml GUI

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