[anjuta-devel] New project interface and introspection



Hi Abderrahim,

I have compiled anjuta with introspection enable and try it a bit. I have get a few troubles to build it but it seems to work. I understand a bit better how it's working.

I think the current interface can work if we add (transfer none) annotation on all AnjutaProjectNode object returned by various functions. It will means the object doesn't belong to the caller which is the case, because all modification must be done through the provided functions. I think another option is to consider that all AnjutaProjectNode are constant.

I have created a simple anjuta_project_node_new and anjuta_project_node_free function and it works without any warnings. So I think introspection works fine with such object, it can handle void pointer correctly.

Then they are several open points.

1. I don't know how to add specific data. By example in python if I have an object that I want to associate to this AnjutaProjectNode structure what should I send as argument. Is a gpointer enough to keep this python object ?

2. I can try to check what is the difference between creating a AnjutaProjectNode like it is now and a GObject representing a node. If I use the second choice, it would be nice to have different GType for group node, source node and so on. But all could have different save functions, it is possible or is it considered as virtual functions ?

3. I need to check what is the difference between using GObject or the current structure for project node. Indeed currently, you need to explicitly call the _new and _free function. Using GObject, the new function is needed but I think the free function is needed too to release the last reference. I'm not sure it makes a real difference but I need to think more about this.

4. The gir scanner understand the AnjutaProjectNode correctly but get a trouble with AnjutaProjectProperty. AnjutaProjectNode get the right name Anjuta.ProjectNode while the property keep the C name, AnjutaProjectProperty. I don't know why, I will try to investigate a bit.

Regards,

Sébastien



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