Hi all,

I'm working on a clutter app and have created a library in C which provides an object based on a ClutterModel which should be used outside the library as a ClutterModel.

I now want to pass this off to a GUI written in python (and i haven't written python bindings before) but i'm pretty sure they are being generated correctly using the gobject-codegen stuff much of which i found in the pyclutter makefiles.

However when it comes to compiling the generated .c file i get an error:

   'PyClutterModel_Type' undeclared (first use in this function)

from the line:

        pygobject_register_class(d, "NeuraMenuDir",
   NEURA_TYPE_MENU_DIR, &PyNeuraMenuDir_Type, Py_BuildValue("(O)",
   &PyClutterModel_Type));

which appears to say register my type as a subclass of ClutterModel from pyclutter which is what i want, but PyClutterModel_Type is not provided by the pyclutter headers. So in the vein of pyclutter i tried to add:

   extern PyTypeObject PyClutterModel_Type;

to the headers section of the override file. This compiles and fails at runtime because when i look into the generated pyclutter code, PyClutterModel_Type is defined as:

   PyTypeObject G_GNUC_INTERNAL PyClutterModel_Type;

and so -explicitly- not exported from the library.

So the question:
Does this mean that i cannot extend the ClutterModel from C and provide it through pyclutter? This throws a spanner in things and multiple days of work out the window.

Otherwise, where did i go wrong?


Thanks for your help,


Jamie Lennox

_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to