Domanda

As recommended by pygtk itself, the way forward is GObjectIntrospection. I would like to port a C API for python which uses pygtk.h and pygobject.h. Can anyone show me the way towards documentation on how to do this ?

È stato utile?

Soluzione

Actually pygtk_init() and pygobject_init() are macros found in pygtk headers. We should use init_pygobject() function which takes 3 arguments major, minor and micro which are version numbers or (-1, -1, -1) which is kinda default should work. Also inorder to smoothly run your ported app you may require PySys_SetArgv(0, "[]") which was in my case.

Here is the code I was trying this for:

https://github.com/sagarchalise/geanypy/tree/gtk3

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top