Re: How to create a PyObject of a certain type from a gobject.GPointer?



Instead of creating a Nautilus.OperationHandle type in your Python
code, would you not want to make it so the bindings never send a
GPointer. Can't you just use the annotation: (type
NautilusOperationHandle) to have your python code receive this
instead?

On Sun, Mar 13, 2011 at 9:46 PM, Adam Plumb <adamplumb gmail com> wrote:
> I'm working on updating the nautilus-python bindings to work with the
> gir annotations and am having some trouble figuring out how to pass
> the NautilusOperationHandle parameter (a disguised gpointer) to python
> extensions.  In the current bindings, I pass extensions the handle
> wrapped in a gpointer, then in the return call (which I have written
> an override for) I get the handle pointer from the pointer value.  But
> with the new introspection bindings, the python extensions have to
> call the Nautilus.info_provider_update_complete_invoke() function
> directly, and it will only accept a Nautilus.OperationHandle type
> (this is defined in the Nautilus gir), and not a gobject.GPointer type
> like extensions are passing now.
>
> So what I'm trying to figure out is, how can I create a PyObject of
> type Nautilus.OperationHandle type with the NautilusOperationHandle
> pointer that Nautilus is passing to me?
>
> Adam
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]