On Wed, 2003-11-05 at 16:50, Tim Evans wrote:
> David Farning wrote:
> 
> >> - To create a python gtk widget from a C gtk widget:
> >>       pygobject_new((GObject*) widget);
> >>   If a python wrapper for 'widget' already exists, it will incref and
> >>   return that, other wise it will create a new python wrapper object.
> > 
> > Do you possibly have a concrete example for this?  In particular, I have
> > a a custom gtk treeModel that I would like to wrap?
> 
> The method I described is really only useful for small things.  For 
> wrapping a new type, you would be best to use the "codegen" 
> autogeneration system.  There is a good tutorial here:
>      http://www-106.ibm.com/developerworks/linux/library/l-wrap/
> 
> Looking at the source for pygtk is also a good source of information, 
> but it's rather complex.  You will need to download the source anyway to 
> get the codegen package.


Thanks for the good reference.  I was able to wrap a few simple widgets
as test.  Now as a try a more difficult one--

I have been moving all of my *.h's *.cc's to my build directory in order
to meet dependencies.  But, now I'm wondering what to do about system
dependencies
 
#include <vector>
#include <list>
#include <map>
#include <set>



cc `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.2/
-I.   -c -o pkglist.o pkglist.c
In file included from gtkpkglist.h:24,
                 from pkglist.override:7:
rpackagelister.h:31:18: vector: No such file or directory
rpackagelister.h:32:16: list: No such file or directory
rpackagelister.h:33:15: map: No such file or directory
rpackagelister.h:34:15: set: No such file or directory


I've successfully build the kernel and KDE so I'm petty sure my compiler
is set up correctly.

Thanks
Dave Farning


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to