GtkD ListG Howto?

Ron Tarrant rontarrant at gmail.com
Fri Oct 11 19:53:33 UTC 2019


Hi all,

I'm trying to add an icon list to a GTK Window using 
setIconList(), but what the function expects is a ListG of 
Pixbufs.

The way I understand it, I have to instantiate the Pixbufs, build 
a ListG of void pointers to the Pixbufs, and pass that to 
setIconList().

Here is how I assume this process would play out:

```

Pixbuf airportImage1, airportImage2, airportImage3, airportImage4;
void * image1, image2, image3, image4;

airportImage1 = new Pixbuf("images/airport_25.png");
airportImage2 = new Pixbuf("images/airport_35.png");
airportImage3 = new Pixbuf("images/airport_60.png");
airportImage4 = new Pixbuf("images/airport_100.png");
image1 = &airportImage1;
image2 = &airportImage2;
image3 = &airportImage3;
image4 = &airportImage4;

ListG listG = null;
	
listG = listG.append(image1);
listG = listG.append(image2);
listG = listG.append(image3);
listG = listG.append(image4);

setIconList(listG);

```

But this, although it compiles, just dies when it hits all those 
append() statements.

Would someone please tell me where I'm going off track?




More information about the Digitalmars-d-learn mailing list