GObject Gtk, Gnome, Gtk+, Gl, Gtk2, Gtk3…I don't understand?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 16:00:22

The short story:

If you're programming for GTK 2, use pyGTK.

If you're programming for GTK 3, use pyGObject.

The long story:

From what I understood, pyGTK was based on pyGObject. GObject is the "object" API of GTK. GTK is developped in C, which is not an object-oriented language. GObject is a library that provides advanced object-oriented facilies. All GTK objects inherit from the GObject class provided by that library.

Then came the GObject-introspection work. Its goal was to make bindings maintenance easier, and use source code annotations to automatically generate most of the bindings code for each language (python, C++, etc.). This resulted in the python side in pyGI, the python bindings based on the GObject introspection work. That's when people were told to use it for GTK3 development.

Since then, the GObject-introspection work once provided by pyGI has been integrated into GObject. pyGObject eventually became what developers should use for python development in GTK3.

Please read:

About the GNOME/GTK relationship:

GTK is the toolkit used by the GNOME project. It has been extracted from the GIMP, hence its name (GTK stands for: GIMP Tool Kit). GTK is a core part of the GNOME project, and GTK developers often also are involved in the GNOME project.

Johannes Sasongko

My understanding of those components you mentioned:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!