I'm trying to find the right way to pass a GClosure to a python script from C. I'm updating the nautilus-python extension to work with GObject introspection and one of the extension methods passes a GClosure parameter (one which asks extensions to get file info) which is meant to be passed to another (one which tells nautilus the info operation is complete). I've gotten these methods working with the static bindings by calling the python script with the following:
pyg_boxed_new(G_TYPE_CLOSURE, closure, TRUE, TRUE); Then when the python script passes the closure parameter back, I could convert that back to the GClosure with: GClosure *closure = pyg_boxed_get(py_closure, GClosure); The problem is that now that I'm using the Nautilus gir annotations, when the python script tries to pass the boxed closure back to the C extension I get an error that the method requires a GObject.Closure type. It won't let in a boxed type. So I'm not sure how to fix this. I've tried using pyg_closure_new() but that only seems to create a GClosure object from a python callable function, which is not what I need. Does anyone have any comments/suggestions about what I can do here? Thanks, Adam _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
