Re: [pygtk] .defs and .override

2003-08-01 Thread Jon Willeke
So it's only useful to tweak the .defs file for minor changes that the 
generator can handle, like setting a default parameter value?

The get_cursor_position() function had two glong * output parameters.  I 
added an entry to vte.override and it works.

Thanks, James.  I'm starting to get the hang of this.

At 7/31/2003, James Henstridge wrote:
On 1/08/2003 1:17 AM, Jon Willeke wrote:

I'd like to use the VTE terminal widget, but the Python bindings need a 
little work.  I need to learn a little bit about how the .defs and 
.override files interact.  I've read Ross Burton's article

  

the FAQ entries, and scanned the archives.

As I understand it, the h2def program creates the .defs file, which 
combines with the .override file to create a .c file.

My first task is actually quite similar to the situation in the 
article.  The vte_terminal_feed() and vte_terminal_feed_child() functions 
take a length parameter.  The binding specifies an "s" data parameter and 
an "i" length parameter that I want to change to a single "s#" data 
parameter.  I can do this, as the article suggests, by modifying 
vte.override.  Should I modify vte.defs to reflect the deletion of the 
parameter, or leave it, in case another language binding needs it?  It 
seems that the PyGTK .defs are heavily edited to match the Python interface.
You shouldn't need to do anything to the definition in the .defs file if 
you add an implementation in the .override file.

My second task is to support the vte_terminal_get_cursor_position() 
function.  It appears in vte.defs, but not in the generated vte.c.
Why was the function not generated?  Anyway, I'd like to change the two 
output parameters to a tuple return value.  I think I need to write a 
function in vte.override (and optionally modify vte.defs).
The code generator only handles functions where it recognises all the 
argument types.  Currently it doesn't handle things like (glong *).  Is it 
an integer out argument?  Is it an integer array in argument?  We could 
probably extend the defs format to annotate arguments like this, but I 
haven't done so.  You will need to add an entry to the .override file for 
this method.
___
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] .defs and .override

2003-07-31 Thread James Henstridge
On 1/08/2003 1:17 AM, Jon Willeke wrote:

I'd like to use the VTE terminal widget, but the Python bindings need 
a little work.  I need to learn a little bit about how the .defs and 
.override files interact.  I've read Ross Burton's article

  

the FAQ entries, and scanned the archives.

As I understand it, the h2def program creates the .defs file, which 
combines with the .override file to create a .c file.

My first task is actually quite similar to the situation in the 
article.  The vte_terminal_feed() and vte_terminal_feed_child() 
functions take a length parameter.  The binding specifies an "s" data 
parameter and an "i" length parameter that I want to change to a 
single "s#" data parameter.  I can do this, as the article suggests, 
by modifying vte.override.  Should I modify vte.defs to reflect the 
deletion of the parameter, or leave it, in case another language 
binding needs it?  It seems that the PyGTK .defs are heavily edited to 
match the Python interface. 
You shouldn't need to do anything to the definition in the .defs file if 
you add an implementation in the .override file.

My second task is to support the vte_terminal_get_cursor_position() 
function.  It appears in vte.defs, but not in the generated vte.c.  
Why was the function not generated?  Anyway, I'd like to change the 
two output parameters to a tuple return value.  I think I need to 
write a function in vte.override (and optionally modify vte.defs). 
The code generator only handles functions where it recognises all the 
argument types.  Currently it doesn't handle things like (glong *).  Is 
it an integer out argument?  Is it an integer array in argument?  We 
could probably extend the defs format to annotate arguments like this, 
but I haven't done so.  You will need to add an entry to the .override 
file for this method.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


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


[pygtk] .defs and .override

2003-07-31 Thread Jon Willeke
I'd like to use the VTE terminal widget, but the Python bindings need a 
little work.  I need to learn a little bit about how the .defs and 
.override files interact.  I've read Ross Burton's article

  

the FAQ entries, and scanned the archives.

As I understand it, the h2def program creates the .defs file, which 
combines with the .override file to create a .c file.

My first task is actually quite similar to the situation in the 
article.  The vte_terminal_feed() and vte_terminal_feed_child() functions 
take a length parameter.  The binding specifies an "s" data parameter and 
an "i" length parameter that I want to change to a single "s#" data 
parameter.  I can do this, as the article suggests, by modifying 
vte.override.  Should I modify vte.defs to reflect the deletion of the 
parameter, or leave it, in case another language binding needs it?  It 
seems that the PyGTK .defs are heavily edited to match the Python interface.

My second task is to support the vte_terminal_get_cursor_position() 
function.  It appears in vte.defs, but not in the generated vte.c.  Why was 
the function not generated?  Anyway, I'd like to change the two output 
parameters to a tuple return value.  I think I need to write a function in 
vte.override (and optionally modify vte.defs).

Thanks in advance for any guidance.

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