[pygtk] gtk_clipboard_set_with_data: (skip)
tomeu at sugarlabs.org
Tue Aug 30 14:28:37 WST 2011
On Fri, Jul 1, 2011 at 14:25, Pavel Holejsovsky
<pavel.holejsovsky at 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
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.
> Sorry that I cannot be more helpful,
> pygtk mailing list pygtk at daa.com.au
> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk