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 tried object.getPointer but get an exception that the contained value is not a pointer. So at the heart of my problem is what is being done with:

setValue(iter, ColumnNumber.fontDescription, fontDescription);

fontDescription is a variable of type PgFontDescription which is a class so fontDescription should be a reference to a heap allocated object. Is setValue definitely going to wrap that as a Value rather than an int? It certainly appears not to be wrapping an Object or a Pointer in the Value.

Apologies for seeming to drag this one out, I am not sure how to use the code to find out what is happening.

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().