FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to create ListG of type Pixbuf?

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Thu Feb 25, 2010 1:51 pm    Post subject: How to create ListG of type Pixbuf? Reply with quote

I want to create a ListG of Pixbufs and pass it to setIconList() function. However this

Code:
      ListG imgList = new ListG(null);
      
      Image image = new Image("");
      image.setFromFile(programPath ~ "image/logo/dcoder16.png");
      imgList.append(cast(void*) (image.getPixbuf()));
      
      setIconList(imgList);


doesn't work (segmentation fault). What's wrong?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Fri Feb 26, 2010 1:09 pm    Post subject: Reply with quote

Use image.getPixbuf().getPixbufStruct() so you'll pass the struct itself.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group