cl-webkit
2024-10-12
No Description
1cl-webkit - WebKitGTK+ binding for Common Lisp
1.1About
cl-webkit is a binding to [WebKitGTK+] for Common Lisp, currentlytargeting WebKit version 2. The WebKitGTK+ library adds web browsingcapabilities to an application, leveraging the full power of theWebKit browsing engine.1.2API overview
The cl-webkit API closely follows the WebKit2 API, with the exceptionthat class based interfaces are preferred over functional interfacesin cases where both are provided.That is, *new,get,set
methods are excluded in favour of
make-instance
and slot accessors wherever possible.
For documentation on how to use the WebKit2 API, please refer to the C API documentation.
Backwards compatibility (with older WebKit2 API versions) is not a priority. The binding targets the latest version of Webkit2Gtk+ available on mainstream distributions.
1.3Dependencies
- A working installation of WebKit2GTK+ (whichever package provides
libwebkit2gtk-4.0.so
, e.g.,libwebkit2gtk
on Debian). - A [CFFI] compatible Common Lisp implementation. The package isdeveloped using [SBCL] but should work on any implementation thatsupports CFFI.
- A recent checkout of [cl-cffi-gtk]
1.4Installation
Assuming you have [Quicklisp] installed, do- Clone to
~/common-lisp/quicklisp/local-projects/cl-webkit
- > lisp
- > (ql:quickload :cl-webkit2)
1.4.1Testing
To run tests, you need to additionally install Calispel,float-features and FiveAM (all of these are available viaQuicklisp). After that, simply running(asdf:test-system :cl-webkit2)
should be enough.1.5Contributing
Contributing implies an agreement to redistribute the work under theproject's license (see below); please make sure that you own therights to the work you contribute.1.6Resources
1.7Change Log
1.7.13.5.10
- Add message sending to all extensions in WebkitWebWebContext.
- Add user script handlers support.
- Fix the type passed to language-related functions.
1.7.23.5.9
- Add micro Webkit version to
*features*
.
1.7.33.5.8
- Remove support for Webkit shared lib version 5.0 due to libsoup conflicts.
1.7.43.5.7
- Add bindings for WebKitUserContentFilterStore.
- Add more properties for WebKitWebView.
- Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION value for WebKitHitTestResult enum.
- Fix several implicit dependency issues.
1.7.53.5.6
- Fix SoapMessageHeaders' access from WebKitURIResponse.
1.7.63.5.5
- Add SoapMessageHeaders bindings.
- Use them everywhere, in custom scheme processing too.
1.7.73.5.4
- Add WebKitWebResource bindings.
- Add WebKitUriSchemeResponse bindings and use them in scheme callbacks by default.
- Add GAction-related functions for WebKitContextMenuAction.
1.7.83.5.3
- Fix typing for context menu item-related functions.
1.7.93.5.2
- Fix string processing for custom URLs -- no longer segfaulting on long strings.
1.7.103.5.1
- Add support for libwebkit2gtk-5.0.
- Add advanced editing commands with
webkit-web-view-execute-editing-command-with-arguments
as the way to execute those. - Bugfixes in custom schemes and color chooser requests.
1.7.113.5.0
- Add webkit-web-view-set-cors-allowlist, a binding for a recently (2.34.1) introduced
webkit_web_view_set_cors_allowlist
. - Bug Fix: Catch any condition in C callbacks to avoid crashing the whole Lisp process due to unhandled conditions.
1.7.123.4.0
- Add a binding for
webkit_web_view_try_close
.
1.7.133.3.0
- Add full bindings for
WebKitURIRequest
andWebKitNotification
. - Support libwebkit2gtk-4.1.
- Rename starred functions to non-starred for consistency:
webkit-web-view-can-execute-editing-command*
->webkit-web-view-can-execute-editing-command
.webkit-web-view-send-message-to-page*
->webkit-web-view-send-message-to-page
1.7.143.2.0
- Add
webkit-web-view-can-execute-editing-command*
for easier execution command checking.
1.7.153.1.1
- Export
webkit-web-view-execute-editing-command
properly.
1.7.163.1.0
Additions:webkit-web-view-send-message-to-page*
to sendWebKitUserMesssages
ina nicer Lispy way.- More
WebKitSettings
settings. - Bind all the subtypes of
WebKitPermissionRequest
. - Bindings for:
webkit_user_content_manager_remove_script
webkit_user_content_manager_remove_style_sheet
- New
g-variant-get-maybe-string
: checksGVariant
for nullness and returnsa contained string if possible. - The
WebKitURISchemeRequest
callbacks run on separate thread now. make-jsc-function
should return the originalJSCValue
as a second value.
webkit-web-context-register-uri-scheme-callback
now has one less optional arguments.
- Fix mistyped JSC-related exports.
- Use :string type instead of :pointer for
WebKitUserMessage
names. - webkit2.uri-response is not loaded in cl-webkit.asd.
1.7.173.0.0
- Make
webkit-web-view-evaluate-javascript
process the returned valuesand turn them into the matching Lisp values (seejsc-value-to-lisp
docstring for transformation rules). - The callback to the
webkit-web-view-evaluate-javascript
now acceptstwo required arguments -- the Lispy data, transformed from theresults of code evaluation, and an original JSCValue it wastransformed from. - Add tests (webkit2/tests/ subdirectory and
cl-webkit2/tests
system),mostly for JS evaluation results.
1.8Copying
cl-webkit is distributed under the MIT license.Please note that this licence only covers the binding itself. Refer to the distribution terms of the third-party dependencies for details.