On Sun, 18 Dec 2005, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
BTW, another file which contains lots of implementations that could be auto-generated is gtkfilechooser.inc. As far as I can see, only get_filenames(), get_uris(), list_filters(), list_shortcut_folders() and list_shortcut_folder_uris() need explicit implementations.
Okay, the reason why that is done like that is because gtkfilechooser.inc is a gtk2 interface. I implemented all the gtk2 interfaces as .inc files.
The classes that use the interfaces have to be cast to the interface type for the function to work, otherwise the function doesn't think the class has the appropriate function (compare with c++ vtables).
I actually had it originally like that, but nothing worked properly until I manually put in the function bodies and had the appropriate casts.
All the .inc files should be like this. If not, the functions that aren't probably won't work.
lance