GObject Gtk,Gnome,Gtk +,Gl,Gtk2,Gtk3 ...我不明白? [英] GObject Gtk, Gnome, Gtk+, Gl, Gtk2, Gtk3...I don't understand?

查看:354
本文介绍了GObject Gtk,Gnome,Gtk +,Gl,Gtk2,Gtk3 ...我不明白?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些窗口来托管webkit或/和cairo drwaing,但我必须首先处理所有这些以了解我在做什么。

现在

。我迷路了,不再理解那是什么。



当我尝试使用绑定或试图确定什么是依赖关系时,情况会变得更糟。
例如:在python中,pyGtk被弃用并被pyGObject(有时称为pyGl !!)取代。

有许多网站,许多下载和版本,过时的和新引用,但不是整个架构的一个架构视图

我不明白......所有这些东西是如何混合的相互在太多的网站,软件包和版本?

p>

如果您正在为GTK 2编程,请使用pyGTK。



如果您正在编写GTK 3, pyGObject。



长话短说:

据我了解,pyGTK是基于pyGObject。 GObject是GTK的对象API。 GTK是用C开发的,它不是面向对象的语言。 GObject是一个提供高级面向对象设计的库。所有GTK对象都继承自该库提供的GObject类。



然后是GObject-introspection工作。它的目标是简化绑定维护,并使用源代码注释为每种语言(python,C ++等)自动生成大部分绑定代码。这导致了pyGI中的python方面,这是基于GObject内省工作的python绑定。那时人们被告知要将它用于GTK3开发。



自那时以来,pyGI提供的GObject-introspection工作已被整合到GObject中。 pygObject最终成为开发人员在GTK3中用于python开发的应用程序。



请阅读:


  • https://wiki.gnome.org/Projects/PyGObject



  • 关于GNOME / GTK关系:

    GTK是GNOME项目使用的工具包。它已从GIMP中提取,因此其名称(GTK代表:GIMP Tool Kit)。 GTK是GNOME项目的核心部分,GTK开发人员也经常参与GNOME项目。


    all I need some window to host webkit or/and cairo drwaing, but i have to deal with all that first to understand what I'm doing.

    now. I'm lost and no more understand what's all that about.

    and things get worse when I try working with binding or trying to figure what are dependencies for something. for example: in python, pyGtk deprecated and replaced by pyGObject(sometimes called pyGl!!)

    there are many sites, many downloads and versions, mixed outdated and new references,but not one architectural view of the whole thing.

    what I don't understand..is how all these things mixed with each other in too many sites,packages and versions?

    解决方案

    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.

    这篇关于GObject Gtk,Gnome,Gtk +,Gl,Gtk2,Gtk3 ...我不明白?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆