On Sat, 8 Sep 2018 16:13:00 +0200, Mike Wey wrote:

On 9/8/18 2:15 PM, Russel Winder wrote:

getValueStruct returns a GValue* which doesn't have a gType method or function. :-(

It does have a field named gType, witch is the one you want to use.

I thought I had used .gType rather than .gType() on the "don't use () with nullary functions" style but maybe I didn't.

[…]

It seems that the PgFontDescription is ultimately stored as a boxed type
since:

Type.isA(PgFontDescription.getType(), GType.BOXED)

returns true.

So for now you can use:

auto font = new 
PgFontDescription(cast(PangoFontDescription*)object.getBoxed());

to retrieve the Font description, and hopefully some time soon you can
use object.get!PgFontDescription().

I didn't think of trying Boxed I should have done.

I think I feel ambivalent about the get template idea, it moves things from being GIR driven to being manual binding. Unless I am missing something.