Re: Allegro Wrapper?

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

Well maybe I'll wait then. Having a libffi in Euphoria would benefit greatly in wrapping C libraries. As would having struct support. A better solution to wrapping libraries sounds great instead of what we currently have. Granted though that Allegro is pretty C-ish and wouldn't be too hard to wrap, except for some routines. But if a better solution is on the horizon, then that sounds great.

It might be possible to wrap libffi and then use it as replacement for std/dll.e today, albeit with an external libffi.dll/so floating around. That might be a good way to sketch out the required changes before diving into making changes in the backend.

Icy_Viking said...

Speaking of IUP, I was looking at GUI/Widget toolkits the other day. I was heavily looking at enlightenment/EFL. I develop on Windows and EFL is mainly Linux based, though it is possible to build on Windows according to its documentation. I have yet to sucessfully build it on Windows, but with Windows 10/11 having the Linux Subsystem and Windows 10/11 being even more friendly for programmers (Windows 11 lets you run linux graphical programs, but I'm on Win 10 and my hardware doesn't support 11. Granted there are work-arounds for running graphical Linux apps on Win 10 in the Linux Subsystem), it is becoming easier to develop on. I really think if I or someone else can get EFL to build on Windows, I could start working on a wrapper for Eu, it is very C-ish and looks like it would be fairly straight-forward to wrap. I also took a look at the GTK port of Windows, its a little behind the Linux version, but not by much. Though I don't think there would be much use for a GTK wrapper on Windows.

EFL, like GTK, is one of those libraries where you have to pretty much build your application around all of their core concepts. Their message loop, their object types, their data structures, etc. You're not building "a Euphoria application with EFL interface" you're building "an EFL application using Euphoria" and that's an inversion of principles I'm not too fond of.

I have also been doing almost all of my development in WSL on Windows 10 and it's been working great! I've been testing with IUP, and I'll mount \\wsl$\Ubuntu to a network drive (W:) so I can get to it from command prompt and I can run things from there (with the DLL files in my C:\Euphoria\bin directory).

Icy_Viking said...

I did try wrapping FCTLK(or whatever its called), using the C port. Due to bad documentation though, it ended up being abandoned. I might go back and revisit it, but chances of that are slim.

CFLTK is the C wrapper for FLTK the Fast Light Tool Kit, or "fulltick" which itself is a C++ library. It's neat but has a limited selection of widgets compared to most other tool kits.

Icy_Viking said...

I really think Greg has some good ideas

Thanks, me too!

Icy_Viking said...

adding libffi support, struct support and a better way to wrap C libraries in Eu. It might (key-word might) even be possible to wrap C-Plus-Plus libs in Eu with the updated tools when they become available.

Wrapping C++ directly is possible as long as the ABI is well known and decipherable. AFAIK Matt's original wxEuphoria library did this but he scrapped it in favor of a C shim layer. My approach to wxEuphoria has been a bit of a hybrid between the two: it's still a C shim layer but that layer is built directly into the C++ libraries instead its own dedicated library. Hypothetically it could be turned into a generic C wrapper to replace the ages-old wxC library.

Icy_Viking said...

I saw Greg wrapped libUI for Eu, but that is for minimal GUI programs. An updated win32lib wouldn't be bad with support for Win 10/11 and such.

The original libui was practically abandoned by its original author but a group of developers forked it to libui-ng. It's still not ready for regular use but I'm keeping an eye on it. It's still pretty light on features.

Icy_Viking said...

WxWidgets could be another solution, QT seems to be ahead of wxWidgets at this point, but it would probably be a pain to wrap QT for Eu, also, its CPlusPlus.

wxWidgets has a much smaller dev team and a much slower release cycle than QT. It also aims for better long-term support and compatibility while QT's gone whole-hog into web-based desktop apps, for better or worse.

FYI if you include a tilde in between the "C" and "++" (like this: C~++) it won't parse it as the "addition" (underline) formatting.

Icy_Viking said...

I also did a wrapper for IUP, but its based on an old version.

My latest efforts have resulted in a Makefile and wrapper script that: 1) downloads IUP/CD/IM, 2) extracts the relevant headers and binaries, 3) builds and tests the wrappers, and 4) creates zip packages for each platform. It's almost done!

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu