FLTK bindings for the D programming language

59 views
Skip to first unread message

Dejan Lekic

unread,
Jan 2, 2026, 8:47:16 AMJan 2
to fltk.general
Happy New Year FLTK community.

I have had FLTK bindings for the D programming language for quite some time, but never
really had time to make it good enough to be useful to wider audience. Until two days ago. Originally libfltk, libfltk_images and libfltk_gl were all linked together as I was lazy to do it right. Today I did split the shim into three separate ones, so now only when user adds `fltk:images` as dependecy in DUB it will link with libfltk_images as well.

Project lives on Codeberg: https://codeberg.org/ddn/fltk

Beginners with FLTK and D have three step-by-step guide documents how to start and build everything. There is comprehensive README.md explaining the most important stuff.

Finally, as some of you remember me, I am not a C++ developer for many many years, and I do not actively use FLTK for many years. I thought it would be a waste to leave the code abandoned, as someone may actually find it useful. If there are people out there who find it useful, please feel free to contact me, especially if you would like to take over the project, and develop it further. I only focused on 1.3.11 as that is what I have on my workstation, so natural thing to add would be support for 1.4 and 1.5. I did not test it on anything else.

Kind regards, and happy hacking.

Matthias Melcher

unread,
Jan 4, 2026, 10:15:03 AMJan 4
to fltk.general
Hi Dejan,

nice to read from you! I did look at D a long long time ago and always thought that D and FLTK are a good fit. I never wrote anything meaningful in D, but it is fascinating to see how long it took C++ to catch up to some things in D. 

Thanks for maintaining and updating the D wrapper until now. I can't promise anything on maintaining it further, but now that I know it exists, maybe updating to 1.5 is something I could spend a little time on. 

Do you have any idea if there are other users for you bindings? Is FLTK something that the D world is interested in at all? Is D used in GUI programming? Do they have Qt or similar bindings? It does sound a little bit like a Lone Ranger project ;-) (that's not a bad thing at all - I have many of those).

Greetings and a happy new year,

 Matthias

Dejan Lekic

unread,
Jan 4, 2026, 10:39:04 AMJan 4
to fltk.general
Glad you are still around, my friend!

Yes, C++ is catching up with D last 20 years, and modern C++ is very nice. I wish I had it when I worked as full-time C++ developer. :) Unlike other languages, D offers C++ interop via `extern(C++)`. Unfortunately it was not enough for FLTK, so I had to write those 3 shims (originally it was only one).

I doubt there are any user of this binding as I released it to the public only few days ago. As I said, the main reason why I did it is simply because I thought it would be shame to "rot" on my disk... As for your question about GUI. I used GtkD (https://gtkd.org) for many years and since the beginning the "giddy" project (https://github.com/Kymorphia/gid) as it contains autogenerated bindings to many GTK/GNOME related projects. Yes, there is a Qt binding to D, but I have never tried it. D is used for GUI, and there are many UI packages, some retained, some immediate. D + giD is my personal choice for GUI development last year or two, and before that GtkD, which is now more/less an inactive project.

I will, once or twice a year, try to bring this D `fltk` package up to date, especially after the Fedora upgrades. :) Ofc, it would be the best if there was one or more developers out there who would take over the project, and keep it truly active. Unfortunately I do not know any D developer who uses FLTK. If there is such person, please contact me directly, and I will arrange you have ownership of this project from now on.

Kind regards and happy new year again!
Reply all
Reply to author
Forward
0 new messages