Re: [pygtk] GTK+ Webcore in Python

2005-08-16 Thread Johan Dahlin

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/


Re: [pygtk] GTK+ Webcore in Python

2005-08-16 Thread Nikos Kouremenos
On 8/16/05, Andrew Conkling <[EMAIL PROTECTED]> 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?
> 
> If successful, I'll be interested in working on a PyGTK+ browser
> (again, if only for lesson's sake).  While I don't think this thread
> would be the place to discuss the wisdom of that, I would welcome any
> personal emails on the topic.
> 
> Thanks for your suggestions,
> Andrew

Do not forget to notify us on your progress? (Add a project page etc,
and get also help from the dev in that project). Gecko is too much,
gkthml2 is too little, and gtkhml3 is not wrapped also :$

Keep it up!
-- 
Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour
___
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/


Re: [pygtk] GTK+ Webcore in Python

2005-08-16 Thread François Pinard
[Andrew Conkling]

> 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).

I tried both, and quickly fell in love with Pyrex, to the point I did
not retry SWIG in a long time.  (It might have changed, I do not know).

Most likely that SWIG is easier for wrapping an existing library as is,
but then, you obtain exactly the flavour of that library, which may fit
Python OO more or less happily, depending of the library design.  Pyrex
allowed me to adjust the interfaces, improving them until they really
got the Python flavour I wanted.  This was probably more work overall,
but the results were more satisfying, and less headaches for my users.

-- 
François Pinard   http://pinard.progiciels-bpi.ca
___
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/


[pygtk] GTK+ Webcore in Python

2005-08-16 Thread Andrew Conkling
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?

If successful, I'll be interested in working on a PyGTK+ browser
(again, if only for lesson's sake).  While I don't think this thread
would be the place to discuss the wisdom of that, I would welcome any
personal emails on the topic.

Thanks for your suggestions,
Andrew

-- 
http://aconkling.blogspot.com
___
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/