Forum > Other

Is it possible to use LCL widgets from a C program?

(1/2) > >>

cruxic:
Hello all,

I'm mostly new to Object Pascal but am very impressed by your extensive widgetset support (GTK, Qt, Windows, OSX etc).  How hard would it be to compile the essential components (eg window, button, checkbox, combobox, radio) into a shared library and call them from C code?  Would this be swimming against the current too much?  Is this the right place to ask such a question?

If you're curious about why I ask, you can read about my stdgui project: https://github.com/cruxic/stdgui

Much Thanks!
- Cruxic

marcov:
Well, first LCL is object oriented Pascal. So you would have to create a procedural C callable api in Pascal first.

Then you need to keep in mind that the widgetset is supported compiletime. So you would need a LCL shared lib per widgetset.

Finally, there are probably issues stuffing the LCL in a shared lib atm. (which is why Lazarus/FPC doesn't ship with everything in libs by default)

Leledumbo:

--- Quote ---How hard would it be to compile the essential components (eg window, button, checkbox, combobox, radio) into a shared library and call them from C code?  Would this be swimming against the current too much?  Is this the right place to ask such a question?
--- End quote ---
If anyone is patient enough, feel free to port the whole LCL. Currently, there's a LCL Bindings project that serves as a proof of concept (but never get any further for years).

cruxic:
Thats kinda what I figured.  Thanks for the replies, folks.

felipemdc:
It is possible, like lclbindings shows. And is not that hard, well not more than Qt bindings for Pascal for example.

Navigation

[0] Message Index

[#] Next page

Go to full version