Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread James Henstridge
ha shao wrote:


On Thu, Oct 31, 2002 at 09:21:03AM +0800, James Henstridge wrote:
 

There are two options here.  The first is to add the binding to pygtk or 
gnome-python.  The second is to distribute a stand alone package.

   


vte and libgsf include python binding under a python/ subdirectory. 
And the python binding can be compiled by supply a flag to ./configure.

If the upstream do python, it will be good since he/she can also
check in interface changed into the python binding when needed.
If the upstream don't do python, pythhon will not likely be included.
 

This is another issue I missed in my previous message.  Where a binding 
goes also depends on the dependencies of the library it is wrapping. 
For instance, it would be bad to put a binding for a library that used 
libgsf into pygtk, as it would create a dependency loop (pygtk requires 
libfoo which requires libgsf in order to build the foo bindings, and 
libgsf requires pygtk in order to build the gsf python bindings).

Such a loop causes all sorts of problems (you would usually need to 
build one of the packages twice), so we don't want to push pygtk too far 
up the dependency chain.  Bindings in the "gnome-python" package are 
less of an issue though.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 



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


Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread ha shao
On Thu, Oct 31, 2002 at 09:21:03AM +0800, James Henstridge wrote:
> There are two options here.  The first is to add the binding to pygtk or 
> gnome-python.  The second is to distribute a stand alone package.
> 

vte and libgsf include python binding under a python/ subdirectory. 
And the python binding can be compiled by supply a flag to ./configure.

If the upstream do python, it will be good since he/she can also
check in interface changed into the python binding when needed.
If the upstream don't do python, pythhon will not likely be included.

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



Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread James Henstridge
Johan Dahlin wrote:


   * How/Who do I send my work to?
   

James, again, is there something for gnome-python?
 

There are two options here.  The first is to add the binding to pygtk or 
gnome-python.  The second is to distribute a stand alone package.

The main benefit of including it in gnome-python is for wider 
distribution of the code.

Benefits of having a separate package is that you can make releases at 
your own pace (rather than waiting for a gnome-python release, for 
instance).  Also, you can cause your package to error out during 
configure if GtkSourceView is not found (if it went into gnome-python, 
the configure script would most likely be set up to simply ignore the 
wrapper if GtkSourceView wasn't found).

It would also be worth looking at what kind of API stability guarantees 
are being given for GtkSourceView at the moment.  If the API changes 
much, building as a separate package is probably the right answer at the 
moment.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




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


Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread Johan Dahlin
Em Qua, 2002-10-30 às 20:14, Ahmad Baitalmal escreveu:
> It's Alive!!
Congratulations

> The problem was that the header files in gtksourceview
> (gtksourcebuffer.h) had function declarations with no implementation.
> The compiler didn't complain when compiling gtksrouceview or the wrapper
> in gnome-python, but when importing it was looking for those functions.
I've seen the same issure a few times before, i've should have spotted
that before.

> So here are my next questions:
> * How/Who do I send the fixes for gtksourceview to?
Check out the file AUTHOR or MAINTAINER in CVS.
IIRC it's Mikael Hermansson who's responsible.

> * How/Who do I send my work to?
James, again, is there something for gnome-python?
> * How do I correctly handle GList* functions because I don't
>   think they were created by codegen?
You can't you have to override them separately, add them to your
.override function and look in [gtk|pango|atk].override for examples how
to handle GLists.

> * How do I correctly handle GError**?
The code generator should handle them correctly automagically.

> If there is a paper already out there on my questions please point me to
> it, otherwise, I might just write down my own experience as I go and
> make it available.

Sorry, i don't think it is. All you have is the source code for pygtk
and gnome-python. There is a lot of information in there, but you have
to dig.

> On Wed, 2002-10-30 at 06:12, Johan Dahlin wrote:
> Verify with ld, so it's actually linked against libgtksourceview.o and
> verify so the symbol, gtk_source_buffer_get_tag_end exists in the
> library by using nm.
> 
> Johan: I think you meant "ldd"?
Indeed :-)

It's nice to see that more modules getting python bindings.
Keep up with the good work!

--
Johan Dahlin
<[EMAIL PROTECTED]>

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



Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread Ahmad Baitalmal
It's Alive!!
The problem was that the header files in gtksourceview
(gtksourcebuffer.h) had function declarations with no implementation.
The compiler didn't complain when compiling gtksrouceview or the wrapper
in gnome-python, but when importing it was looking for those functions.

The missing functions:
"gtk_source_buffer_get_tag_start"
"gtk_source_buffer_get_tag_end"
I commented then out in gtksourcebuffer.h since they were not use
anywhere anyway.
"gtk_source_view_remove_all_markers"
This was mis-named with "view" instead of "buffer". Fixed that.


I didn't do any testing yet, but it works as far as just creating a
SourceView and adding it to a window.

So here are my next questions:
* How/Who do I send the fixes for gtksourceview to?
* How/Who do I send my work to?
* How do I correctly handle GList* functions because I don't
  think they were created by codegen?
* How do I correctly handle GError**?
If there is a paper already out there on my questions please point me to
it, otherwise, I might just write down my own experience as I go and
make it available.


On Wed, 2002-10-30 at 06:12, Johan Dahlin wrote:
Verify with ld, so it's actually linked against libgtksourceview.o and
verify so the symbol, gtk_source_buffer_get_tag_end exists in the
library by using nm.

Johan: I think you meant "ldd"?

-  - --   - --- -- -   -
Ahmad Baitalmal
BitBuilder
web: http://www.bitbuilder.com
-  - --  
-- --- -- - 
-
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/