giD v0.9.6: WebKit web browser engine binding, GObject property support, and improved docs

Luna luna at foxgirls.gay
Mon Apr 28 21:01:52 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).
>
> **Example:**
> ```D
>   with(new Window) {
>     window.title = "Hello World Example";
>     window.defaultWidth = 200;
>     window.defaultHeight = 200;
>     window.child = new Label("Hello World!");
>     self.present;
>   }
> ```
>
> Some rather significant object renames were also done to make 
> the API more consistent. This mainly affected classes which use 
> reserved D names, such as "Object", "Exception", "Error", 
> "Monitor", etc. Instead of appending the library name to the 
> class name, "Wrap" is just used. So ObjectG became ObjectWrap. 
> VariantG was also just named Variant, since a rename is not 
> required. At this point we don't expect such significant 
> backwards compatibility breaking changes moving forward to a 
> 1.0 release.
>
> Many improvements were also made to the generated [adrdox 
> documentation](https://www.kymorphia.com/gid/).

My personal recommendation would be to follow the GLib naming 
standard instead; so instead of ObjectWrap, or ObjectG; just call 
it GObject, for Pango call it PangoFont, etc.
That makes it consistent with existing GLib documentation for 
cases where you're gidgen'ing your own API bindings, etc.


More information about the Digitalmars-d-announce mailing list