On Fri, Jul 1, 2011 at 14:25, Pavel Holejsovsky
<pavel.holejsov...@gmail.com> wrote:
> Hi Giuseppe,
>
> On 7/1/2011 10:21 AM, Giuseppe Penone wrote:
>>
>> I'm a GTK+ developer that used to work in pygtk2 and now ported the code
>> to pygobject introspection.
>> For my (GPL) application http://giuspen.com/cherrytree I absolutely need
>> the function gtk_clipboard_set_with_data
>> that I see you marhed as NON introspectable.
>> I wanted to ask you that function will ever be binded/what alternative
>> should I use instead.
>
> I marked the function as (skip) because AFAIK current version of
> gobject-introspection really can't handle it; the reason is that this
> function shares single user_data field for 2 closures (get_func and
> clear_func), and this is not supported.
>
> In order to be supported by current introspection, a new function would have
> to be added into GTK, which has one user_data for each callback.

I think best would be to add a bindable alternative that accepts 2
GClosure arguments. Then bindings can just marshall those and not try
to do complex stuff with several user_datas, GDestroyNotify, etc.

Plus, if we keep the supported arguments simpler, we can give better
error messages when people pass an incorrect number or types of
arguments.

See the patch in https://bugzilla.gnome.org/review?bug=621092 for an
example of how to do this.

> An alternate solution is to provide some 'manual binding', i.e. binding this
> function directly, not through introspection.  Sorry, I'm not involved with
> python so I'm not sure how it works.  Maybe asking at
> irc://irc.gnome.org/python could help?

Right now we don't carry C extensions to Gtk+ and I hope we don't try
to. All the functionality in Gtk+ is supposed to be accessible through
bindable APIs, so it's there where we have to fix these.

Regards,

Tomeu

> Sorry that I cannot be more helpful,
> Pavel
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to