webui-dev / pascal-webui Goto Github PK
View Code? Open in Web Editor NEWUse any web browser as GUI, with Pascal in the backend and HTML5 in the frontend.
License: MIT License
Use any web browser as GUI, with Pascal in the backend and HTML5 in the frontend.
License: MIT License
Can you modify it and support delphi?
You did not try to use webui as a replacement for webview in order to serve an interface that already exists as a separate website?
I have used Microsoft edge webview2 and compare the webui capabilities with it.
So far it seems that something is missing, what do you say?
hello , thank you for the work u did , i tried the do button click and show message but doesnt work ,please check the below code
program project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX} cthreads, {$ENDIF} Classes,WebUI,Dialogs,Interfaces { you can add units after this }; var window: size_t; procedure EventHandler(e: Pwebui_event_t); begin //writeln('Received callback: ', e^.data); ShowMessage('hello'); end; begin window := webui_new_window; webui_show(window, '1.html'); webui_bind(window, 'myid', @EventHandler); webui_wait; end.
Since I dont have any Mac, Im asking for help to check if Pascal WebUI wrapper is working fine there, in real world. I only tested on VirtualBox.
Branch with MacOS support:
https://github.com/webui-dev/pascal-webui/tree/MacOS
I suggest to check if text editor
example from examples/Lazarus
directory works. Install Lazarus
, open text_editor.lpi
, compile, run. webui-2.dylib
is required and it has to be in the same folder where the compiled executable is.
Any Mac owner can test. WebUI binaries for MacOS are available here: v2.4.0.
fpcupdeluxe
Download the tool (I used fpcupdeluxe-x86_64-darwin-cocoa.zip
):
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0a
Open, click Trunk
in the left bottom corner, it will install latest Lazarus + FPC, thats all you need.
In the this example, we used webui_interface_set_response()
, I guess we should use instead webui_return_string()
.
The function webui_interface_set_response()
works fine, but all functions starting with webui_interface_xxx
are designed to be used by the wrappers, like Pascal-Wraper.
The best solution is to make the examples use 100% Pascal code style by doing this:
[Pascal Example] -> [webui.pas] -> [WebUILib]
[WebUILib] -> [webui.pas events listener] -> [Pascal Example Callback]
I adapted webui.pas for Delphi, generated the JS file and and compiled a console project without error or warning.
Nevertheless nothing happened when running the program - in an Paralles VM with Windows 11 ARM on a Macbook M1 Pro.
Tried same on a PC again nothing happened.
Have no idea where to start searching for the problem.
Maybe you can give me a hint?
lazarus and free pascal trunk
...
webui.pas(52,12) Error: Identifier not found "ULONG_PTR"
webui.pas(52,21) Error: Error in type definition
webui.pas(58,13) Error: Illegal expression
webui.pas(59,17) Error: Illegal expression
webui.pas(61,19) Error: Illegal expression
webui.pas(62,14) Error: Illegal expression
webui.pas(68,60) Error: Type "size_t" is not completely defined
.....
webui.pas(162,48) Verbose: There were 50 errors compiling module, stopping
Verbose: Compilation aborted
Verbose: /home/nouzi/dev/trunk/fpc/bin/x86_64-linux/ppcx64 returned an error exitcode
Hello,
how can I bind a procedure in Lazarus/Freepascal with an event,
returning element value?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.