Andrew Conkling wrote:
I'm interested (if only for lesson's sake) in using GTK+ Webcore
(http://gtk-webcore.sourceforge.net) in Python.  To do so (as far as
I've read), I must use Pyrex or SWIG.  I've heard that Pyrex is
probably easier to use (i.e. induces less headaches).  Can anyone
confirm that or suggest otherwise?

Since gtk-webcore uses gtk+, you probably want to be able to use it together with other gtk+ applications. That means you'd have to integrate it with PyGTK which has it's own code generator.

Basic howto:

* Extract API information from headers:
  Run h2defs.py, found in pygtk through all public headers and create
  a .defs file

* Create an .override template
  Copy atk.override, remove the wrapped method, change headers adapt.

* Create a *module.c
  Copy atkmodule.c, replace atk with the name of your module

* Create autotools infrastructure
  configure.in, Makefile.am: Too much work to go into detail here

When this is done you can get a basic version of the module working.
After that you'll need to tweak the .defs file, mark some functions as
constructors of some types. Override some functions which can not be auto generated, PyGTK itself is usually a good place to look for hints here.

There's very little documentation out there, but it's not particularly difficult, just a bit of work.

--
Johan Dahlin <[EMAIL PROTECTED]>
Async Open Source


begin:vcard
fn:Johan Dahlin
n:Dahlin;Johan
org:Async Open Source;Development
adr;quoted-printable:Jardim Macarengo;;Rua Orlando Damiano, 2212;S=C3=A3o Carlos;SP;13560-450;Brazil
email;internet:[EMAIL PROTECTED]
title:Software developer
tel;work:+55 16 3376 0125
tel;fax:+55 16 3501 5394
tel;home:+55 16 3501 5332
tel;cell:+55 16 9112 6219
x-mozilla-html:FALSE
url:http://www.async.com.br
version:2.1
end:vcard

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

Reply via email to