Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如 pygtk 本身所建议的那样,前进的方向是 GObjectIntrospection。我想为使用 pygtk.h 和 pygobject.h 的 python 移植一个 C API。谁能告诉我有关如何执行此操作的文档的方法?
实际上pygtk_init()和pygobject_init()是在 pygtk 头文件中找到的宏。我们应该使用init_pygobject()带有 3 个参数的函数,主要、次要和微型,它们是版本号或 (-1, -1, -1),这有点默认应该可以工作。此外,为了顺利运行您可能需要的移植应用程序PySys_SetArgv(0, "[]"),就我而言。
pygtk_init()
pygobject_init()
init_pygobject()
PySys_SetArgv(0, "[]")
这是我正在尝试的代码:
https://github.com/sagarchalise/geanypy/tree/gtk3