giD v0.9.6: WebKit web browser engine binding, GObject property support, and improved docs
Dejan Lekic
dejan.lekic at gmail.com
Fri Apr 25 12:27:08 UTC 2025
On Monday, 21 April 2025 at 14:35:37 UTC, Element Green wrote:
> giD v0.9.6 has been released. This release adds a
> [WebKit](https://webkit.org/) 6 binding, the popular web
> browser engine used in Safari and other popular web browsers (D
> web browser anyone?). With the additional support libraries
> this brings the total giD library support count to 64.
>
> This release also adds support for GObject property methods
> which was added to [gidgen](https://gidgen.dub.pm). Until now
> these had not been implemented since there are usually
> getter/setter methods also part of most GIR APIs. Some objects
> rely completely on GObject properties though which was why
> support was added and because it looks elegant as well
> (especially compared to calling getProperty/setProperty GObject
> templates).
EG, you rock as always. Thanks for this - amazing job!
However, I think the code you gave as an example is incorrect. It
should be:
```d
with(new Window) {
title = "Hello World Example";
defaultWidth = 200;
defaultHeight = 200;
child = new Label("Hello World!");
self.present;
}
```
(`window.` removed). This is all so nice and clean. Love it!
I wish we did not have to rely on "self" in our code but hey,
Walter and Co. did
not give us a good alternative... I wish some of the core devs
actually noticed my post from few weeks ago:
https://forum.dlang.org/thread/xroybbdawaojiavsqydb@forum.dlang.org
Another example of the new properties in action:
https://codeberg.org/dejan/gid-examples/src/branch/main/adw-simple/source/app.d#L26
More information about the Digitalmars-d-announce
mailing list